Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
extend
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
park
extend
Commits
40e3697f
Commit
40e3697f
authored
Jul 23, 2020
by
lixian7
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
绑定接口异常返回调整
parent
43598534
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
12 additions
and
14 deletions
+12
-14
api/src/main/java/com/hikcreate/edl/pub/web/mobile/api/controller/BindInfoControlller.java
+11
-13
api/src/main/java/com/hikcreate/edl/pub/web/mobile/api/exception/GlobalExceptionHandler.java
+1
-1
No files found.
api/src/main/java/com/hikcreate/edl/pub/web/mobile/api/controller/BindInfoControlller.java
View file @
40e3697f
...
...
@@ -57,10 +57,11 @@ public class BindInfoControlller extends BaseController {
}
catch
(
DistributedLockException
e
)
{
log
.
error
(
"分布式锁超时"
);
return
ResultGenerator
.
fail
(
StatusCode
.
REPEAT_SUBMIT
);
}
catch
(
Exception
e
)
{
log
.
error
(
"系统异常:{}"
,
e
);
return
ResultGenerator
.
fail
(
StatusCode
.
SYSTEM_ERROR
);
}
// catch ( Exception e ) {
// log.error("系统异常:{}", e);
// return ResultGenerator.fail(StatusCode.SYSTEM_ERROR);
// }
return
response
;
}
...
...
@@ -73,7 +74,13 @@ public class BindInfoControlller extends BaseController {
@BodyDecryptAnnotation
@ResponseEncryptAnnotation
public
Result
<
BindInfoRes
>
bindSmsValid
(
@RequestBody
@Validated
BindSmsValidReq
req
)
{
return
service
.
bindSmsValid
(
req
);
Result
result
=
null
;
try
{
result
=
service
.
bindSmsValid
(
req
);
}
catch
(
DistributedLockException
e
)
{
return
ResultGenerator
.
fail
(
StatusCode
.
REPEAT_SUBMIT
);
}
return
result
;
}
...
...
@@ -94,9 +101,6 @@ public class BindInfoControlller extends BaseController {
result
=
service
.
unbindInfo
(
req
);
}
catch
(
DistributedLockException
e
)
{
return
ResultGenerator
.
fail
(
StatusCode
.
REPEAT_SUBMIT
);
}
catch
(
Exception
e
)
{
log
.
error
(
"系统异常:{}"
,
e
);
return
ResultGenerator
.
fail
(
StatusCode
.
SYSTEM_ERROR
);
}
return
result
;
}
...
...
@@ -115,9 +119,6 @@ public class BindInfoControlller extends BaseController {
result
=
service
.
adminUnbind
(
req
);
}
catch
(
DistributedLockException
e
)
{
return
ResultGenerator
.
fail
(
StatusCode
.
REPEAT_SUBMIT
);
}
catch
(
Exception
e
)
{
log
.
error
(
"系统异常:{}"
,
e
);
return
ResultGenerator
.
fail
(
StatusCode
.
SYSTEM_ERROR
);
}
return
result
;
}
...
...
@@ -136,9 +137,6 @@ public class BindInfoControlller extends BaseController {
result
=
service
.
adminUnbindSmsValid
(
req
);
}
catch
(
DistributedLockException
e
)
{
return
ResultGenerator
.
fail
(
StatusCode
.
REPEAT_SUBMIT
);
}
catch
(
Exception
e
)
{
log
.
error
(
"系统异常:{}"
,
e
);
return
ResultGenerator
.
fail
(
StatusCode
.
SYSTEM_ERROR
);
}
return
result
;
}
...
...
api/src/main/java/com/hikcreate/edl/pub/web/mobile/api/exception/GlobalExceptionHandler.java
View file @
40e3697f
...
...
@@ -90,7 +90,7 @@ public class GlobalExceptionHandler {
@ExceptionHandler
({
BusinessException
.
class
})
@ResponseBody
public
Response
<
Object
>
handle
(
BusinessException
e
)
{
log
.
warn
(
e
.
toString
(),
e
);
log
.
error
(
e
.
toString
(),
e
);
return
ResponseGenerator
.
fail
(
e
.
getCode
(),
e
.
getMsg
(),
e
.
getErrorMsg
(),
e
.
getParam
());
}
...
...
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