Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
SmartBox
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
苗权威
SmartBox
Commits
591240c1
Commit
591240c1
authored
Sep 15, 2020
by
李进峰
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加错误日志
parent
1b75903b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
8 deletions
+16
-8
DeployController.java
.../ai/qiwu/com/tts_service/controller/DeployController.java
+16
-8
No files found.
tts_service/src/main/java/ai/qiwu/com/tts_service/controller/DeployController.java
View file @
591240c1
...
@@ -85,10 +85,20 @@ public class DeployController {
...
@@ -85,10 +85,20 @@ public class DeployController {
String
targetBotAccount
=
requestBody
.
getString
(
"targetBotAccount"
);
String
targetBotAccount
=
requestBody
.
getString
(
"targetBotAccount"
);
String
tmpFileFullPathStr
=
Initialize
.
AUDIO_DIR
+
tmpFileRelativePathStr
;
String
tmpFileFullPathStr
=
Initialize
.
AUDIO_DIR
+
tmpFileRelativePathStr
;
Path
tmpFileFullPath
=
Paths
.
get
(
tmpFileFullPathStr
);
Path
tmpFileFullPath
=
Paths
.
get
(
tmpFileFullPathStr
);
if
(
Files
.
exists
(
tmpFileFullPath
)
if
(!
Files
.
exists
(
tmpFileFullPath
)
&&
Files
.
isDirectory
(
tmpFileFullPath
)
)
{
&&
!
Files
.
isDirectory
(
tmpFileFullPath
)
ServerResponse
<
Object
>
result
=
ServerResponse
.
createByError
();
&&
StringUtils
.
endsWith
(
tmpFileRelativePathStr
,
".mp3"
)
result
.
setMsg
(
"缓存文件不存在!"
);
&&
tmpFileRelativePathStr
.
startsWith
(
"/game_editor_tmp"
))
{
log
.
error
(
tmpFileFullPath
.
toString
()+
"路径不存在,或者是目录"
);
return
result
;
}
if
(!
StringUtils
.
endsWith
(
tmpFileRelativePathStr
,
".mp3"
)
&&
!
tmpFileRelativePathStr
.
startsWith
(
"/game_editor_tmp"
))
{
ServerResponse
<
Object
>
result
=
ServerResponse
.
createByError
();
result
.
setMsg
(
"地址前缀或者后缀有问题!"
);
log
.
error
(
tmpFileFullPath
.
toString
()+
"路径不存在,或者是目录"
);
return
result
;
}
try
{
try
{
String
tmpFileRelativePathStr2
=
tmpFileRelativePathStr
.
substring
(
"/game_editor_tmp"
.
length
());
String
tmpFileRelativePathStr2
=
tmpFileRelativePathStr
.
substring
(
"/game_editor_tmp"
.
length
());
if
(
tmpFileRelativePathStr2
.
startsWith
(
File
.
separator
+
targetBotAccount
))
{
if
(
tmpFileRelativePathStr2
.
startsWith
(
File
.
separator
+
targetBotAccount
))
{
...
@@ -107,12 +117,10 @@ public class DeployController {
...
@@ -107,12 +117,10 @@ public class DeployController {
return
ServerResponse
.
createBySuccess
(
targetFileRelativePathStr
);
return
ServerResponse
.
createBySuccess
(
targetFileRelativePathStr
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
}
log
.
error
(
"请求体:"
+
requestBody
);
}
return
ServerResponse
.
createByError
();
return
ServerResponse
.
createByError
();
}
}
}
@GetMapping
(
"/background/audio"
)
@GetMapping
(
"/background/audio"
)
public
ServerResponse
moveTempToCertain
(
String
path
,
@RequestParam
(
required
=
false
)
String
oldPath
)
{
public
ServerResponse
moveTempToCertain
(
String
path
,
@RequestParam
(
required
=
false
)
String
oldPath
)
{
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment