Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
C
customer-service
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
QG
customer-service
Commits
3c507b26
Commit
3c507b26
authored
Dec 31, 2019
by
xiaozhe.chen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
添加还款记录查询接口
parent
beb0581e
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
17 deletions
+9
-17
NetCommunicationException.java
...ntgroup/customer/exception/NetCommunicationException.java
+0
-7
AdviceRest.java
src/main/java/cn/quantgroup/customer/rest/AdviceRest.java
+4
-5
UserServiceImpl.java
.../cn/quantgroup/customer/service/impl/UserServiceImpl.java
+5
-5
No files found.
src/main/java/cn/quantgroup/customer/exception/NetCommunicationException.java
deleted
100644 → 0
View file @
beb0581e
package
cn
.
quantgroup
.
customer
.
exception
;
public
class
NetCommunicationException
extends
RuntimeException
{
public
NetCommunicationException
(
String
message
)
{
super
(
message
);
}
}
src/main/java/cn/quantgroup/customer/rest/AdviceRest.java
View file @
3c507b26
package
cn
.
quantgroup
.
customer
.
rest
;
import
cn.quantgroup.customer.constant.Constant
;
import
cn.quantgroup.customer.enums.ErrorCodeEnum
;
import
cn.quantgroup.customer.exception.NetCommunicationException
;
import
cn.quantgroup.customer.exception.BusinessException
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.http.HttpStatus
;
...
...
@@ -23,12 +22,12 @@ public class AdviceRest {
}
@ExceptionHandler
({
NetCommunication
Exception
.
class
})
@ExceptionHandler
({
Business
Exception
.
class
})
@ResponseBody
@ResponseStatus
(
HttpStatus
.
OK
)
public
JsonResult
handle
NetCommunicationException
(
NetCommunication
Exception
ex
)
{
public
JsonResult
handle
BusinessException
(
Business
Exception
ex
)
{
log
.
info
(
ex
.
getMessage
());
return
JsonResult
.
buildErrorStateResult
(
ErrorCodeEnum
.
NET_ERROR
.
getMessage
(),
ErrorCodeEnum
.
NET_ERROR
.
getCode
());
return
JsonResult
.
buildErrorStateResult
(
ex
.
getType
().
getMessage
(),
ex
.
getType
()
.
getCode
());
}
...
...
src/main/java/cn/quantgroup/customer/service/impl/UserServiceImpl.java
View file @
3c507b26
...
...
@@ -3,7 +3,7 @@ package cn.quantgroup.customer.service.impl;
import
cn.quantgroup.customer.common.adapter.LocalDateTypeAdapter
;
import
cn.quantgroup.customer.entity.User
;
import
cn.quantgroup.customer.enums.ErrorCodeEnum
;
import
cn.quantgroup.customer.exception.
NetCommunication
Exception
;
import
cn.quantgroup.customer.exception.
Business
Exception
;
import
cn.quantgroup.customer.repo.UserRepo
;
import
cn.quantgroup.customer.rest.param.phone.ModifyPhoneAudit
;
import
cn.quantgroup.customer.rest.param.phone.ModifyPhoneFeedback
;
...
...
@@ -70,7 +70,7 @@ public class UserServiceImpl implements IUserService {
return
response
;
}
catch
(
Exception
e
)
{
log
.
error
(
"[user][query modify phone list] 网络通讯异常,modifyPhoneQuery:{},ex:{}"
,
modifyPhoneQuery
,
ExceptionUtils
.
getStackTrace
(
e
));
throw
new
NetCommunicationException
(
ErrorCodeEnum
.
NET_ERROR
.
getMessage
()
);
throw
new
BusinessException
(
ErrorCodeEnum
.
NET_ERROR
);
}
}
...
...
@@ -86,7 +86,7 @@ public class UserServiceImpl implements IUserService {
return
result
;
}
catch
(
Exception
e
)
{
log
.
error
(
"[user][query modify audit ] 网络通讯异常,modifyPhoneAudit:{},ex:{}"
,
modifyPhoneAudit
,
ExceptionUtils
.
getStackTrace
(
e
));
throw
new
NetCommunicationException
(
ErrorCodeEnum
.
NET_ERROR
.
getMessage
()
);
throw
new
BusinessException
(
ErrorCodeEnum
.
NET_ERROR
);
}
}
...
...
@@ -103,7 +103,7 @@ public class UserServiceImpl implements IUserService {
return
result
;
}
catch
(
Exception
e
)
{
log
.
error
(
"[user][query modify feedback ] 网络通讯异常,modifyPhoneFeedback:{},ex:{}"
,
modifyPhoneFeedback
,
ExceptionUtils
.
getStackTrace
(
e
));
throw
new
NetCommunicationException
(
ErrorCodeEnum
.
NET_ERROR
.
getMessage
()
);
throw
new
BusinessException
(
ErrorCodeEnum
.
NET_ERROR
);
}
}
...
...
@@ -122,7 +122,7 @@ public class UserServiceImpl implements IUserService {
return
String
.
valueOf
(
uuid
);
}
catch
(
Exception
e
)
{
log
.
error
(
"[user][query uuid by idNo ] 网络通讯异常,idNo:{},ex:{}"
,
idNo
,
ExceptionUtils
.
getStackTrace
(
e
));
throw
new
NetCommunicationException
(
ErrorCodeEnum
.
NET_ERROR
.
getMessage
()
);
throw
new
BusinessException
(
ErrorCodeEnum
.
NET_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