Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
open-source
/
open-platform-admin
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Settings
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit d6d9a20e
authored
Dec 19, 2020
by
杨林龙
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
修改ICE接口调用参数
1 parent
11b9345b
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
1 deletions
src/main/java/com/glsx/controller/CustomerMgrController.java
src/main/java/com/glsx/exception/GlobalExceptionHandler.java
src/main/java/com/glsx/controller/CustomerMgrController.java
View file @
d6d9a20
...
...
@@ -12,6 +12,7 @@ import org.springframework.web.bind.annotation.RequestMethod;
import
org.springframework.web.bind.annotation.ResponseBody
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.security.NoSuchAlgorithmException
;
import
java.util.List
;
//@Api
...
...
@@ -61,7 +62,7 @@ public class CustomerMgrController {
@RequestMapping
(
value
=
"/register"
,
method
=
RequestMethod
.
POST
)
@ResponseBody
public
R
register
(
PlatformCustomer
customer
)
{
public
R
register
(
PlatformCustomer
customer
)
throws
NoSuchAlgorithmException
{
int
num
=
customerMgrService
.
register
(
customer
);
if
(
num
==
0
)
{
return
R
.
error
(
"注册失败"
);
...
...
src/main/java/com/glsx/exception/GlobalExceptionHandler.java
View file @
d6d9a20
...
...
@@ -9,6 +9,8 @@ import org.slf4j.LoggerFactory;
import
org.springframework.web.bind.annotation.ExceptionHandler
;
import
org.springframework.web.bind.annotation.RestControllerAdvice
;
import
java.security.NoSuchAlgorithmException
;
/**
* <p>Description:
* <p>Project: open-platform-admin
...
...
@@ -37,4 +39,10 @@ public class GlobalExceptionHandler {
this
.
logger
.
error
(
"!!!! ERROR"
,
e
);
return
R
.
error
(
ResultCodeEnum
.
SERVER_ERROR
);
}
@ExceptionHandler
({
NoSuchAlgorithmException
.
class
})
public
R
handlerOtherException
(
NoSuchAlgorithmException
e
)
{
this
.
logger
.
error
(
"!!!! ERROR"
,
e
);
return
R
.
error
(
ResultCodeEnum
.
SERVER_ERROR
);
}
}
Write
Preview
Markdown
is supported
Attach a file
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 post a comment