mirror of https://gitee.com/xiaonuobase/snowy
Pre Merge pull request !254 from bubu/dev
commit
f326c38c64
|
@ -331,7 +331,11 @@ public class AuthServiceImpl implements AuthService {
|
|||
if(ObjectUtil.isEmpty(existValidCode)) {
|
||||
throw new CommonException(AuthExceptionEnum.VALID_CODE_ERROR.getValue());
|
||||
}
|
||||
// 移除该验证码
|
||||
// 不一致则直接验证码错误
|
||||
if (!validCode.equalsIgnoreCase(Convert.toStr(existValidCode))) {
|
||||
throw new CommonException("验证码错误");
|
||||
}
|
||||
// 验证成功移除该验证码
|
||||
if(ObjectUtil.isEmpty(phoneOrEmail)) {
|
||||
// 图形验证码
|
||||
commonCacheOperator.remove(AUTH_VALID_CODE_CACHE_KEY + validCodeReqNo);
|
||||
|
@ -339,10 +343,6 @@ public class AuthServiceImpl implements AuthService {
|
|||
// 手机或者邮箱验证码
|
||||
commonCacheOperator.remove(AUTH_VALID_CODE_CACHE_KEY + phoneOrEmail + StrUtil.UNDERLINE + validCodeReqNo);
|
||||
}
|
||||
// 不一致则直接验证码错误
|
||||
if (!validCode.equalsIgnoreCase(Convert.toStr(existValidCode))) {
|
||||
throw new CommonException("验证码错误");
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue