|
@@ -98,19 +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) {
|
|
- if (debugMode || this.authCode) {
|
|
|
|
- if (defaultPwd.equals(authCode)) {
|
|
|
|
- return true;
|
|
|
|
- }
|
|
|
|
- } else {
|
|
|
|
- String key = "verificationCode" + keyEnum + mobile;
|
|
|
|
- Object object = redisCache.get(key);
|
|
|
|
- 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;
|
|
|
|
- }
|
|
|
|
|
|
+
|
|
|
|
+ // 本地调试模式
|
|
|
|
+ if ((debugMode || this.authCode) && StringUtils.equalsIgnoreCase(defaultPwd, authCode)) {
|
|
|
|
+ return true;
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
+ String key = "verificationCode" + keyEnum + mobile;
|
|
|
|
+ Object object = redisCache.get(key);
|
|
|
|
+ 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 false;
|
|
return false;
|
|
}
|
|
}
|
|
|
|
|