puzhibing
2025-01-15 1713c123000197858fb7266b38374f3e5d09d826
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
@@ -58,9 +57,14 @@
            recordLogService.recordLogininfor(request, user.getUserId().intValue(), username, Constants.LOGIN_FAIL_STATUS,errMsg);
            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);