作者 也曾为你像超人
提交者 Gitee

密码输入错误时,登录日志重复

Signed-off-by: 也曾为你像超人 <1553592282@qq.com>
@@ -60,16 +60,12 @@ public class SysPasswordService @@ -60,16 +60,12 @@ public class SysPasswordService
60 60
61 if (retryCount >= Integer.valueOf(maxRetryCount).intValue()) 61 if (retryCount >= Integer.valueOf(maxRetryCount).intValue())
62 { 62 {
63 - AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL,  
64 - MessageUtils.message("user.password.retry.limit.exceed", maxRetryCount, lockTime)));  
65 throw new UserPasswordRetryLimitExceedException(maxRetryCount, lockTime); 63 throw new UserPasswordRetryLimitExceedException(maxRetryCount, lockTime);
66 } 64 }
67 65
68 if (!matches(user, password)) 66 if (!matches(user, password))
69 { 67 {
70 retryCount = retryCount + 1; 68 retryCount = retryCount + 1;
71 - AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL,  
72 - MessageUtils.message("user.password.retry.limit.count", retryCount)));  
73 redisCache.setCacheObject(getCacheKey(username), retryCount, lockTime, TimeUnit.MINUTES); 69 redisCache.setCacheObject(getCacheKey(username), retryCount, lockTime, TimeUnit.MINUTES);
74 throw new UserPasswordNotMatchException(); 70 throw new UserPasswordNotMatchException();
75 } 71 }