puzhibing
2025-01-08 b22df417e0bc423c788b013feaad686531d69eed
ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysPasswordService.java
@@ -59,13 +59,13 @@
            throw new ServiceException(errMsg);
        }
        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 (!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("密码错误");
//        }
        else
        {
            clearLoginRecordCache(username);