puzhibing
2025-01-14 777a9b7335259bd7dd9a5c151de125cf7b0997dc
修改bug
4个文件已修改
8 ■■■■ 已修改文件
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/BalanceChangeRecordServiceImpl.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/resources/mapper/account/BalanceChangeRecordMapper.xml 4 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsBargainPriceServiceImpl.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/controller/AppUserController.java
@@ -524,6 +524,7 @@
        AppUser byId = appUserService.lambdaQuery()
                .eq(AppUser::getPhone, phone)
                .eq(AppUser::getDelFlag,0)
                .eq(AppUser::getStatus,1)
                .one();
        if (byId == null) {
            return R.fail("搜索失败,手机号错误。");
ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/BalanceChangeRecordServiceImpl.java
@@ -54,6 +54,7 @@
        // 过滤商城购物
        List<BalanceChangeRecord> collect = balanceChangeRecordIPage.getRecords().stream().filter(e -> e.getChangeType() != 5).collect(Collectors.toList());
        for (BalanceChangeRecord changeRecord : collect) {
            if (changeRecord.getBeforeAmount()!=null && changeRecord.getAfterAmount()!=null){
            BigDecimal subtract = changeRecord.getBeforeAmount().subtract(changeRecord.getAfterAmount());
            if (subtract.compareTo(BigDecimal.ZERO)>0){
                // 减少
@@ -64,6 +65,7 @@
                changeRecord.setChangeAmountString("¥"+changeRecord.getChangeAmount());
            }
        }
        }
        balanceChangeRecordIPage.setRecords(collect);
        return new CommissionStatistics(totalCommission, balanceChangeRecordIPage);
    }
ruoyi-service/ruoyi-account/src/main/resources/mapper/account/BalanceChangeRecordMapper.xml
@@ -29,7 +29,9 @@
            tau.phone userPhone,
            tbcr.change_type,
            tbcr.create_time,
            tbcr.change_amount
            tbcr.change_amount,
        tbcr.beforeAmount,
        tbcr.afterAmount
        FROM
            t_balance_change_record tbcr
                LEFT JOIN t_app_user tau ON tbcr.app_user_id = tau.id
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/GoodsBargainPriceServiceImpl.java
@@ -94,6 +94,7 @@
        //添加明细
        List<GoodsBargainPriceDetail> list = vo.getList();
        for (GoodsBargainPriceDetail goodsBargainPriceDetail : list) {
            goodsBargainPriceDetail.setId(null);
            goodsBargainPriceDetail.setGoodsBargainPriceId(bargainPrice.getId());
        }
        goodsBargainPriceDetailService.saveBatch(list);