密码输入错误时,登录日志重复
Signed-off-by: 也曾为你像超人 <1553592282@qq.com>
This commit is contained in:
		
							parent
							
								
									36b900cef8
								
							
						
					
					
						commit
						a9bcfc66c3
					
				| 
						 | 
					@ -60,16 +60,12 @@ public class SysPasswordService
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (retryCount >= Integer.valueOf(maxRetryCount).intValue())
 | 
					        if (retryCount >= Integer.valueOf(maxRetryCount).intValue())
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL,
 | 
					 | 
				
			||||||
                    MessageUtils.message("user.password.retry.limit.exceed", maxRetryCount, lockTime)));
 | 
					 | 
				
			||||||
            throw new UserPasswordRetryLimitExceedException(maxRetryCount, lockTime);
 | 
					            throw new UserPasswordRetryLimitExceedException(maxRetryCount, lockTime);
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        if (!matches(user, password))
 | 
					        if (!matches(user, password))
 | 
				
			||||||
        {
 | 
					        {
 | 
				
			||||||
            retryCount = retryCount + 1;
 | 
					            retryCount = retryCount + 1;
 | 
				
			||||||
            AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.LOGIN_FAIL,
 | 
					 | 
				
			||||||
                    MessageUtils.message("user.password.retry.limit.count", retryCount)));
 | 
					 | 
				
			||||||
            redisCache.setCacheObject(getCacheKey(username), retryCount, lockTime, TimeUnit.MINUTES);
 | 
					            redisCache.setCacheObject(getCacheKey(username), retryCount, lockTime, TimeUnit.MINUTES);
 | 
				
			||||||
            throw new UserPasswordNotMatchException();
 | 
					            throw new UserPasswordNotMatchException();
 | 
				
			||||||
        }
 | 
					        }
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue