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

登陆校验修改

parent ce3de67e
...@@ -47,6 +47,7 @@ public class CaptchaFiniteValidateAdvisor { ...@@ -47,6 +47,7 @@ public class CaptchaFiniteValidateAdvisor {
private static final String SUPER_CAPTCHA_ID = UUID.nameUUIDFromBytes("__QG_APPCLIENT_AGENT__".getBytes(Charset.forName("UTF-8"))).toString(); private static final String SUPER_CAPTCHA_ID = UUID.nameUUIDFromBytes("__QG_APPCLIENT_AGENT__".getBytes(Charset.forName("UTF-8"))).toString();
private static final String SUPER_CAPTCHA = "__SUPERQG__"; private static final String SUPER_CAPTCHA = "__SUPERQG__";
private static final String ALERT_TEMP = "密码错误已超过次数,请%s分钟后再试";
@Autowired @Autowired
@Qualifier("stringRedisTemplate") @Qualifier("stringRedisTemplate")
private RedisTemplate<String, String> redisTemplate; private RedisTemplate<String, String> redisTemplate;
...@@ -98,7 +99,7 @@ public class CaptchaFiniteValidateAdvisor { ...@@ -98,7 +99,7 @@ public class CaptchaFiniteValidateAdvisor {
Long expire = redisTemplate.opsForValue().getOperations().getExpire(lock_key); Long expire = redisTemplate.opsForValue().getOperations().getExpire(lock_key);
if (expire != null && expire > 0L) { if (expire != null && expire > 0L) {
return JsonResult.buildErrorStateResult("密码错误已超过次数,请"+expire+"分钟后再试", null); return JsonResult.buildErrorStateResult(String.format(ALERT_TEMP, expire), null);
} }
} }
......
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