Commit d15021eb authored by 技术部-任文超's avatar 技术部-任文超

短信验证码计数问题修改

parent d8b3eff5
...@@ -283,15 +283,10 @@ public class UserController implements IBaseController { ...@@ -283,15 +283,10 @@ public class UserController implements IBaseController {
String phoneNo = credentialArr[0]; String phoneNo = credentialArr[0];
String verificationCode = credentialArr[1]; String verificationCode = credentialArr[1];
LOGGER.info("用户快速登录,phoneNo:{} , verificationCode:{}", phoneNo, verificationCode); LOGGER.info("用户快速登录,phoneNo:{} , verificationCode:{}", phoneNo, verificationCode);
if (!ValidationUtil.validatePhoneNo(phoneNo)) { if (!ValidationUtil.validatePhoneNo(phoneNo) || StringUtils.isBlank(verificationCode)) {
result.put("fail", JsonResult.buildErrorStateResult("登录失败", null)); result.put("fail", JsonResult.buildErrorStateResult("登录失败", null));
return result; 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)); result.put("success", JsonResult.buildSuccessResult(verificationCode, phoneNo));
return result; return result;
} }
...@@ -625,6 +620,7 @@ public class UserController implements IBaseController { ...@@ -625,6 +620,7 @@ public class UserController implements IBaseController {
private void smsValidForRegister(String phoneNo, String verificationCode) { private void smsValidForRegister(String phoneNo, String verificationCode) {
if (!smsService.validRegisterOrResetPasswdVerificationCode(phoneNo, verificationCode)) { if (!smsService.validRegisterOrResetPasswdVerificationCode(phoneNo, verificationCode)) {
smsReSendOrNot(phoneNo); smsReSendOrNot(phoneNo);
LOGGER.info("用户快速注册,验证码校验失败,phoneNo:{} , verificationCode:{}", phoneNo, verificationCode);
throw new VerificationCodeErrorException("短信验证码错误"); throw new VerificationCodeErrorException("短信验证码错误");
} }
} }
...@@ -637,6 +633,7 @@ public class UserController implements IBaseController { ...@@ -637,6 +633,7 @@ public class UserController implements IBaseController {
private void smsValidForFastLogin(String phoneNo, String verificationCode) { private void smsValidForFastLogin(String phoneNo, String verificationCode) {
if (!smsService.validateFastLoginVerificationCode(phoneNo, verificationCode)) { if (!smsService.validateFastLoginVerificationCode(phoneNo, verificationCode)) {
smsReSendOrNot(phoneNo); smsReSendOrNot(phoneNo);
LOGGER.info("用户快速登录,验证码校验失败,phoneNo:{} , verificationCode:{}", phoneNo, verificationCode);
throw new VerificationCodeErrorException("短信验证码错误"); throw new VerificationCodeErrorException("短信验证码错误");
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment