Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
X
xyqb-user2
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
head_group
xyqb-user2
Commits
d15021eb
Commit
d15021eb
authored
Nov 08, 2017
by
技术部-任文超
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
短信验证码计数问题修改
parent
d8b3eff5
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
6 deletions
+3
-6
UserController.java
...ntgroup/xyqb/controller/internal/user/UserController.java
+3
-6
No files found.
src/main/java/cn/quantgroup/xyqb/controller/internal/user/UserController.java
View file @
d15021eb
...
...
@@ -283,15 +283,10 @@ public class UserController implements IBaseController {
String
phoneNo
=
credentialArr
[
0
];
String
verificationCode
=
credentialArr
[
1
];
LOGGER
.
info
(
"用户快速登录,phoneNo:{} , verificationCode:{}"
,
phoneNo
,
verificationCode
);
if
(!
ValidationUtil
.
validatePhoneNo
(
phoneNo
))
{
if
(!
ValidationUtil
.
validatePhoneNo
(
phoneNo
)
||
StringUtils
.
isBlank
(
verificationCode
)
)
{
result
.
put
(
"fail"
,
JsonResult
.
buildErrorStateResult
(
"登录失败"
,
null
));
return
result
;
}
if
(!
smsService
.
validateFastLoginVerificationCode
(
phoneNo
,
verificationCode
))
{
LOGGER
.
info
(
"用户快速登录,验证码校验失败,phoneNo:{} , verificationCode:{}"
,
phoneNo
,
verificationCode
);
result
.
put
(
"fail"
,
JsonResult
.
buildErrorStateResult
(
"验证码不正确"
,
null
));
return
result
;
}
result
.
put
(
"success"
,
JsonResult
.
buildSuccessResult
(
verificationCode
,
phoneNo
));
return
result
;
}
...
...
@@ -625,6 +620,7 @@ public class UserController implements IBaseController {
private
void
smsValidForRegister
(
String
phoneNo
,
String
verificationCode
)
{
if
(!
smsService
.
validRegisterOrResetPasswdVerificationCode
(
phoneNo
,
verificationCode
))
{
smsReSendOrNot
(
phoneNo
);
LOGGER
.
info
(
"用户快速注册,验证码校验失败,phoneNo:{} , verificationCode:{}"
,
phoneNo
,
verificationCode
);
throw
new
VerificationCodeErrorException
(
"短信验证码错误"
);
}
}
...
...
@@ -637,6 +633,7 @@ public class UserController implements IBaseController {
private
void
smsValidForFastLogin
(
String
phoneNo
,
String
verificationCode
)
{
if
(!
smsService
.
validateFastLoginVerificationCode
(
phoneNo
,
verificationCode
))
{
smsReSendOrNot
(
phoneNo
);
LOGGER
.
info
(
"用户快速登录,验证码校验失败,phoneNo:{} , verificationCode:{}"
,
phoneNo
,
verificationCode
);
throw
new
VerificationCodeErrorException
(
"短信验证码错误"
);
}
}
...
...
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