From 388dc59f69027c5746590662d03c35dcde761b18 Mon Sep 17 00:00:00 2001
From: 无关风月 <443237572@qq.com>
Date: 星期四, 16 一月 2025 21:00:12 +0800
Subject: [PATCH] Merge branch 'master' of http://120.76.84.145:10101/gitblit/r/java/qijisheng
---
ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysPasswordService.java | 10 +++++++---
1 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysPasswordService.java b/ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysPasswordService.java
index 1f6a419..47783e0 100644
--- a/ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysPasswordService.java
+++ b/ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysPasswordService.java
@@ -24,7 +24,6 @@
private RedisService redisService;
private int maxRetryCount = CacheConstants.PASSWORD_MAX_RETRY_COUNT;
-
private Long lockTime = CacheConstants.PASSWORD_LOCK_TIME;
@Autowired
@@ -59,13 +58,18 @@
throw new ServiceException(errMsg);
}
- if (!matches(user, password))
- {
+ if (!matches(user,password)){
retryCount = retryCount + 1;
recordLogService.recordLogininfor(request, user.getUserId().intValue(), username, Constants.LOGIN_FAIL_STATUS, String.format("密码输入错误%s次", retryCount));
redisService.setCacheObject(getCacheKey(username), retryCount, lockTime, TimeUnit.MINUTES);
throw new ServiceException("密码错误");
}
+// if (!user.getPassword().equals(password)){
+// retryCount = retryCount + 1;
+// recordLogService.recordLogininfor(request, user.getUserId().intValue(), username, Constants.LOGIN_FAIL_STATUS, String.format("密码输入错误%s次", retryCount));
+// redisService.setCacheObject(getCacheKey(username), retryCount, lockTime, TimeUnit.MINUTES);
+// throw new ServiceException("密码错误");
+// }
else
{
clearLoginRecordCache(username);
--
Gitblit v1.7.1