Commit 2b575fe3 authored by 唐峰's avatar 唐峰

Merge branch 'feature-migration-20230628-v1' into feature-migration-20230628

parents 919ef5e5 7ac83d46
......@@ -6,6 +6,7 @@ import cn.quantgroup.xyqb.entity.User;
import cn.quantgroup.xyqb.exception.BizException;
import cn.quantgroup.xyqb.exception.BizExceptionEnum;
import cn.quantgroup.xyqb.exception.UserNotExistException;
import cn.quantgroup.xyqb.exception.VerificationCodeErrorException;
import cn.quantgroup.xyqb.model.AuthBean;
import cn.quantgroup.xyqb.model.LoginBean;
import cn.quantgroup.xyqb.model.LoginProperties;
......@@ -151,12 +152,12 @@ public class SMSLoginStrategy implements LoginStrategy {
if (!smsService.verifyPhoneAndCode(phoneNo, code)) {
// 是否需要重新发送短信验证码
if (smsService.needResendCode(phoneNo, VERIFICATION_CODE_FINITE_COUNT_NEW, false)) {
throw new BizException(BizExceptionEnum.EXPIRE_SMS_CODE);
throw new VerificationCodeErrorException(BizExceptionEnum.EXPIRE_SMS_CODE.getMsg());
}
smsService.deleteOnlyCodeFromCache(phoneNo);
log.info("验证码校验失败,phoneNo:{} , verificationCode:{}", phoneNo, code);
throw new BizException(BizExceptionEnum.ERROR_SMS_CODE);
throw new VerificationCodeErrorException(BizExceptionEnum.ERROR_SMS_CODE.getMsg());
} else {
smsService.deleteCodeFromCache(phoneNo);
}
......
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