mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
Merge remote-tracking branch 'origin/dev' into dev-zzx
This commit is contained in:
@@ -134,10 +134,18 @@ public class MemberService {
|
||||
if (StringUtils.isEmpty(captchaCode)) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_VERIFICATION_CODE_TIMEOUT_ERROR);
|
||||
}
|
||||
// 如果缓存中有,但与实际不一致,则为验证码错误
|
||||
if (!StringUtils.equals(captchaCode, dto.getVerificationCode())) {
|
||||
// 获取通用验证码
|
||||
String commonCaptchaCode = redisCache.getCacheObject(CacheConstants.SMS_COMMON_VERIFICATION_CODE_KEY + dto.getMobileNumber());
|
||||
|
||||
// 缓存中的验证码或者通用验证码, 两个都不匹配, 则抛出异常
|
||||
if (!StringUtils.equals(captchaCode, dto.getVerificationCode()) && !StringUtils.equals(commonCaptchaCode, dto.getVerificationCode())) {
|
||||
throw new BusinessException(ReturnCodeEnum.CODE_VERIFICATION_CODE_ERROR);
|
||||
}
|
||||
|
||||
// 如果缓存中有,但与实际不一致,则为验证码错误
|
||||
// if (!StringUtils.equals(captchaCode, dto.getVerificationCode())) {
|
||||
// throw new BusinessException(ReturnCodeEnum.CODE_VERIFICATION_CODE_ERROR);
|
||||
// }
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user