puzhibing
2025-01-15 dce9ff99702c579fec6b003aa08a01f17e2656df
ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysPasswordService.java
@@ -58,7 +58,12 @@
            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 (!user.getPassword().equals(password)){
//            retryCount = retryCount + 1;
//            recordLogService.recordLogininfor(request, user.getUserId().intValue(), username, Constants.LOGIN_FAIL_STATUS, String.format("密码输入错误%s次", retryCount));