Commit 89f5bcc2 authored by 董建华's avatar 董建华

解开限制

parent cc321d90
......@@ -92,25 +92,24 @@ public class CaptchaFiniteValidateAdvisor {
}
if (countErrorByPhone > Constants.Image_Need_Count) {
/**
* 输入密码错误超过一定次数限制登陆
* 先不上这个登录5次的
* 输入密码错误超过一定次数限制登
*/
// if (countErrorByPhone >= Constants.PASSWORD_ERROR_LOCK_COUNT) {
//
// String lock_key = Constants.PASSWORD_LOCK_PRE.concat(phoneNo);
//
// Long expire = redisTemplate.opsForValue().getOperations().getExpire(lock_key);
// /**
// * 查看锁的剩余时间不存在说明已经解锁
// */
// if (null != expire && expire > 0L) {
// /**
// * 获取到的时间是秒 转化为分 大概转一下吧不要太精确
// */
// expire = expire > 60L ? expire / 60 : 1L;
// return JsonResult.buildErrorStateResult(String.format(ALERT_TEMP, expire ), null);
// }
// }
if (countErrorByPhone >= Constants.PASSWORD_ERROR_LOCK_COUNT) {
String lock_key = Constants.PASSWORD_LOCK_PRE.concat(phoneNo);
Long expire = redisTemplate.opsForValue().getOperations().getExpire(lock_key);
/**
* 查看锁的剩余时间不存在说明已经解锁
*/
if (null != expire && expire > 0L) {
/**
* 获取到的时间是秒 转化为分 大概转一下吧不要太精确
*/
expire = expire > 60L ? expire / 60 : 1L;
return JsonResult.buildErrorStateResult(String.format(ALERT_TEMP, expire ), null);
}
}
String registerFrom = Optional.ofNullable(request.getParameter("registerFrom")).orElse("");
String captchaId = Optional.ofNullable(request.getParameter(Constants.QG_CAPTCHA_ID)).orElse("");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment