|
@@ -98,21 +98,20 @@ public class RedisIdGeneratorService implements IdGeneratorService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public boolean verifyValidCode(String mobile, String authCode,String keyEnum) {
|
|
public boolean verifyValidCode(String mobile, String authCode,String keyEnum) {
|
|
|
|
+
|
|
|
|
+ // 验证码验证
|
|
|
|
+ String key = "verificationCode" + keyEnum + mobile;
|
|
|
|
+ Object object = redisCache.get(key);
|
|
|
|
+ String verifyCode = object == null ? null : object.toString();
|
|
if (debugMode || this.authCode) {
|
|
if (debugMode || this.authCode) {
|
|
- if (defaultPwd.equals(authCode)) {
|
|
|
|
- return true;
|
|
|
|
- }
|
|
|
|
|
|
+ return defaultPwd.equals(authCode)
|
|
|
|
+ || (StringUtils.isNoneEmpty(verifyCode) && StringUtils.equalsIgnoreCase(verifyCode, authCode));
|
|
} else {
|
|
} else {
|
|
- String key = "verificationCode" + keyEnum + mobile;
|
|
|
|
- Object object = redisCache.get(key);
|
|
|
|
|
|
+
|
|
log.info("*********************mobile:{} smsCode:{} inutCode:{}******************", key, object, authCode);
|
|
log.info("*********************mobile:{} smsCode:{} inutCode:{}******************", key, object, authCode);
|
|
- String verifyCode = object == null ? null : object.toString();
|
|
|
|
- if (StringUtils.isNoneEmpty(verifyCode) && StringUtils.equalsIgnoreCase(verifyCode, authCode)) {
|
|
|
|
- return true;
|
|
|
|
- }
|
|
|
|
|
|
+ return StringUtils.isNoneEmpty(verifyCode) && StringUtils.equalsIgnoreCase(verifyCode, authCode);
|
|
}
|
|
}
|
|
- return false;
|
|
|
|
- }
|
|
|
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
|