实名认证--聚合实名认证--修改验证短信验证码逻辑
This commit is contained in:
parent
7dae675586
commit
f82a5aa959
@ -2485,12 +2485,17 @@ public class AppSystemController extends BaseController {
|
||||
String countKey = CacheConstants.CAPTCHA_CODE_KEY_COUNT + phone;
|
||||
int captchaCount = redisCache.getCacheObject(countKey);
|
||||
|
||||
|
||||
|
||||
if (captcha == null ) {
|
||||
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.expire")));
|
||||
throw new CaptchaDisableException();
|
||||
}
|
||||
|
||||
if(captchaCount >= 3){
|
||||
// 尝试次数加1
|
||||
redisCache.setCacheObject(countKey, captchaCount + 1);
|
||||
|
||||
if(captchaCount > 3){
|
||||
// 删除缓存
|
||||
redisCache.deleteObject(verifyKey);
|
||||
redisCache.deleteObject(countKey);
|
||||
@ -2507,8 +2512,7 @@ public class AppSystemController extends BaseController {
|
||||
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL, MessageUtils.message("user.jcaptcha.error")));
|
||||
throw new CaptchaException();
|
||||
}
|
||||
// 尝试次数加1
|
||||
redisCache.setCacheObject(countKey, captchaCount + 1);
|
||||
|
||||
// else{
|
||||
// // 登录成功删除验证码
|
||||
// redisCache.deleteObject(verifyKey);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user