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
c9200409
Commit
c9200409
authored
Mar 24, 2020
by
杨钧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改get请求验证方式
parent
06af8c41
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
6 deletions
+10
-6
OrderRest.java
src/main/java/cn/quantgroup/customer/rest/OrderRest.java
+0
-3
RepayRest.java
src/main/java/cn/quantgroup/customer/rest/RepayRest.java
+10
-3
No files found.
src/main/java/cn/quantgroup/customer/rest/OrderRest.java
View file @
c9200409
package
cn
.
quantgroup
.
customer
.
rest
;
package
cn
.
quantgroup
.
customer
.
rest
;
import
cn.quantgroup.customer.rest.param.ordermapping.OrderQueryParam
;
import
cn.quantgroup.customer.rest.param.ordermapping.OrderQueryParam
;
import
cn.quantgroup.customer.rest.param.repay.RepayOrderInfoQuery
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
cn.quantgroup.customer.service.IOrderService
;
import
cn.quantgroup.customer.service.IOrderService
;
import
cn.quantgroup.customer.service.IXyqbService
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.validation.Valid
;
/**
/**
* @author Wang Xiangwei
* @author Wang Xiangwei
...
...
src/main/java/cn/quantgroup/customer/rest/RepayRest.java
View file @
c9200409
package
cn
.
quantgroup
.
customer
.
rest
;
package
cn
.
quantgroup
.
customer
.
rest
;
import
cn.quantgroup.customer.enums.ErrorCodeEnum
;
import
cn.quantgroup.customer.enums.ErrorCodeEnum
;
import
cn.quantgroup.customer.rest.param.card.ModifyCardsQuery
;
import
cn.quantgroup.customer.rest.param.repay.RepayOrderInfoQuery
;
import
cn.quantgroup.customer.rest.param.repay.RepayOrderInfoQuery
;
import
cn.quantgroup.customer.rest.param.repay.RepayOrderQuery
;
import
cn.quantgroup.customer.rest.param.repay.RepayOrderQuery
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
import
cn.quantgroup.customer.rest.vo.JsonResult
;
...
@@ -9,7 +8,7 @@ import cn.quantgroup.customer.service.IRepayService;
...
@@ -9,7 +8,7 @@ import cn.quantgroup.customer.service.IRepayService;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.validation.
annotation.Validated
;
import
org.springframework.validation.
BindingResult
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.PathVariable
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
...
@@ -17,6 +16,8 @@ import org.springframework.web.bind.annotation.RestController;
...
@@ -17,6 +16,8 @@ import org.springframework.web.bind.annotation.RestController;
import
javax.validation.Valid
;
import
javax.validation.Valid
;
import
java.util.StringJoiner
;
import
static
cn
.
quantgroup
.
customer
.
constant
.
Constant
.
GSON
;
import
static
cn
.
quantgroup
.
customer
.
constant
.
Constant
.
GSON
;
@Slf4j
@Slf4j
...
@@ -50,8 +51,14 @@ public class RepayRest {
...
@@ -50,8 +51,14 @@ public class RepayRest {
* @return
* @return
*/
*/
@GetMapping
(
"/info"
)
@GetMapping
(
"/info"
)
public
JsonResult
queryRepayInfo
(
@Valid
RepayOrderInfoQuery
repayOrderQuery
)
{
public
JsonResult
queryRepayInfo
(
@Valid
RepayOrderInfoQuery
repayOrderQuery
,
BindingResult
bindingResult
)
{
log
.
info
(
"[查询还款信息],请求参数:repayOrderQuery={}"
,
repayOrderQuery
);
log
.
info
(
"[查询还款信息],请求参数:repayOrderQuery={}"
,
repayOrderQuery
);
if
(
bindingResult
.
hasErrors
()){
StringJoiner
errorStr
=
new
StringJoiner
(
";"
);
bindingResult
.
getFieldErrors
().
forEach
(
fieldError
->
errorStr
.
add
(
fieldError
.
getDefaultMessage
()));
log
.
info
(
"[查询还款信息],请求参数验证异常:errorStr={}"
,
errorStr
);
return
JsonResult
.
buildErrorStateResult
(
errorStr
.
toString
(),
ErrorCodeEnum
.
PARAM_ERROR
.
getCode
());
}
return
repayService
.
queryRepayInfo
(
repayOrderQuery
);
return
repayService
.
queryRepayInfo
(
repayOrderQuery
);
}
}
...
...
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