puzhibing
2025-01-15 1713c123000197858fb7266b38374f3e5d09d826
修改bug
2个文件已修改
15 ■■■■ 已修改文件
ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysPasswordService.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-auth/src/main/java/com/ruoyi/auth/service/SysPasswordService.java
@@ -57,13 +57,13 @@
            recordLogService.recordLogininfor(request, user.getUserId().intValue(), username, Constants.LOGIN_FAIL_STATUS,errMsg);
            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("密码错误");
//        }
//        if (!user.getPassword().equals(password)){
//            retryCount = retryCount + 1;
//            recordLogService.recordLogininfor(request, user.getUserId().intValue(), username, Constants.LOGIN_FAIL_STATUS, String.format("密码输入错误%s次", retryCount));
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/ShoppingCartServiceImpl.java
@@ -333,6 +333,7 @@
        long goodsSaleNum = orderService.getGoodsSaleNum(shoppingCart.getGoodsId(), null, userid);
        long count = count(new LambdaQueryWrapper<ShoppingCart>()
                .eq(ShoppingCart::getGoodsId, shoppingCart.getGoodsId())
                .eq(ShoppingCart::getStatus,1)
                .eq(ShoppingCart::getAppUserId, userid));
        goodsSaleNum += count;
        Goods goods = goodsClient.getGoodsById(shoppingCart.getGoodsId()).getData();