Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
B
byit-myth-job
Overview
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
liyuan
byit-myth-job
Commits
40b79410
Commit
40b79410
authored
Jan 06, 2021
by
huangfusuper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
..
parent
48afde58
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
7 additions
and
2 deletions
+7
-2
ApiNodeServiceImpl.java
...c/main/java/com/byit/service/impl/ApiNodeServiceImpl.java
+3
-1
ExceptionHandle.java
...re/src/main/java/com/byit/web/advice/ExceptionHandle.java
+4
-1
No files found.
byit-myth-admin/src/main/java/com/byit/service/impl/ApiNodeServiceImpl.java
View file @
40b79410
...
...
@@ -249,7 +249,9 @@ public class ApiNodeServiceImpl implements ApiNodeService {
public
void
deleteJavaTask
(
String
jobName
)
{
ValidationUtil
.
dataNotBank
(
jobName
,
"jobName不允许为空!"
);
JavaTask
javaTask
=
javaTaskMapper
.
findByJobName
(
jobName
);
ValidationUtil
.
dataNotNull
(
javaTask
,
"没有此任务实例!"
);
if
(
javaTask
==
null
){
return
;
}
javaTaskMapper
.
deleteByJobName
(
jobName
);
}
...
...
byit-myth-core/myth-web-core/src/main/java/com/byit/web/advice/ExceptionHandle.java
View file @
40b79410
...
...
@@ -6,6 +6,7 @@ import com.byit.enums.TransferResultEnum;
import
com.byit.exception.DataValidationException
;
import
com.byit.job.exceptions.IException
;
import
com.byit.job.utils.MythLogUtils
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.RestControllerAdvice
;
...
...
@@ -16,6 +17,7 @@ import org.springframework.web.bind.annotation.RestControllerAdvice;
* @date: 2019/12/25 16:02
**/
@RestControllerAdvice
@Slf4j
public
class
ExceptionHandle
{
/**
* 全局异常捕捉
...
...
@@ -30,7 +32,8 @@ public class ExceptionHandle {
}
else
if
(
e
instanceof
DataValidationException
){
return
ResponseResult
.
error
(
TransferResultEnum
.
ERROR
.
getCode
(),
e
.
getMessage
());
}
return
ResponseResult
.
error
(
MythLogUtils
.
getMessage
(
e
));
log
.
error
(
MythLogUtils
.
getMessage
(
e
));
return
ResponseResult
.
error
(
"调度中心走神了,请稍后再试~~!"
);
}
/**
...
...
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