Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
Y
youka-api
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
java-youka-wallet
youka-api
Commits
7c947ddf
Commit
7c947ddf
authored
Jun 19, 2018
by
tang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
身份证校验
parent
8ce4d01c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
3 deletions
+6
-3
UserApiController.java
src/main/java/com/thinkgem/jeesite/modules/user/api/UserApiController.java
+6
-3
No files found.
src/main/java/com/thinkgem/jeesite/modules/user/api/UserApiController.java
View file @
7c947ddf
...
...
@@ -446,6 +446,8 @@ public class UserApiController {
||
StringUtils
.
isBlank
(
request
.
getBelongBank
())
||
StringUtils
.
isBlank
(
request
.
getCardBank
())
)
{
logger
.
debug
(
"业务参数就异常了"
);
logger
.
debug
(
request
.
toString
());
// || StringUtils.isBlank(request.getIdCardPlace())|| StringUtils.isBlank(request.getIdCardFront())|| StringUtils.isBlank(request.getIdCardBack())|| StringUtils.isBlank(request.getIdCardBack())
// || StringUtils.isBlank(request.getIdCardHold())|| StringUtils.isBlank(request.getDebitCard())|| StringUtils.isBlank(request.getCardSrc())|| StringUtils.isBlank(request.getCardPlace())
resp
.
setStatus
(
ComCode
.
STATUS_CODE_4001
);
...
...
@@ -453,15 +455,16 @@ public class UserApiController {
return
resp
;
}
//身份证参数格式校验
if
(!
verifyIdentityCard
(
request
.
getIdCard
())){
if
(!
verifyIdentityCard
(
request
.
getIdCard
().
trim
())){
logger
.
debug
(
"身份证这里校验出问题了"
);
throw
new
MyException
(
"身份证号码格式不正确"
);
}
//进行卡片校验
if
(!
NumberUtils
.
isNumber
(
request
.
getCardNo
())){
if
(!
NumberUtils
.
isNumber
(
request
.
getCardNo
()
.
trim
()
)){
throw
new
MyException
(
"卡号格式不正确"
);
}
//手机号码校验
if
(!
regex
.
matcher
(
request
.
getCardMobile
()).
matches
()){
if
(!
regex
.
matcher
(
request
.
getCardMobile
()
.
trim
()
).
matches
()){
throw
new
MyException
(
"手机号码格式不正确"
);
}
...
...
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