Commit c2fab050 authored by 董建华's avatar 董建华

修改限制登录的code

parent 8e779a84
...@@ -48,6 +48,10 @@ public class CaptchaFiniteValidateAdvisor { ...@@ -48,6 +48,10 @@ public class CaptchaFiniteValidateAdvisor {
private static final String SUPER_CAPTCHA = "__SUPERQG__"; private static final String SUPER_CAPTCHA = "__SUPERQG__";
private static final String ALERT_TEMP = "密码错误已超过次数,请%s分钟后再试"; private static final String ALERT_TEMP = "密码错误已超过次数,请%s分钟后再试";
/**
* 时间锁定反的code
*/
private static final Long TOME_LIMIT_CODE = 3L;
@Autowired @Autowired
@Qualifier("stringRedisTemplate") @Qualifier("stringRedisTemplate")
private RedisTemplate<String, String> redisTemplate; private RedisTemplate<String, String> redisTemplate;
...@@ -107,7 +111,7 @@ public class CaptchaFiniteValidateAdvisor { ...@@ -107,7 +111,7 @@ public class CaptchaFiniteValidateAdvisor {
* 获取到的时间是秒 转化为分 大概转一下吧不要太精确 * 获取到的时间是秒 转化为分 大概转一下吧不要太精确
*/ */
expire = expire > 60L ? expire / 60 : 1L; expire = expire > 60L ? expire / 60 : 1L;
return JsonResult.buildErrorStateResult(String.format(ALERT_TEMP, expire ), null); return JsonResult.buildErrorStateResult(String.format(ALERT_TEMP, expire), null, TOME_LIMIT_CODE);
} }
} }
......
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