From 3f8e43bb394301b7018a03d2d38e70e1232443d6 Mon Sep 17 00:00:00 2001 From: phpcjl <phpcjl@gmail.com> Date: 星期三, 18 十二月 2024 16:34:38 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/master' --- ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopBalanceStatementServiceImpl.java | 13 ++----------- 1 files changed, 2 insertions(+), 11 deletions(-) diff --git a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopBalanceStatementServiceImpl.java b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopBalanceStatementServiceImpl.java index 5e53178..9e265b5 100644 --- a/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopBalanceStatementServiceImpl.java +++ b/ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopBalanceStatementServiceImpl.java @@ -10,6 +10,7 @@ import com.ruoyi.other.service.ShopService; import com.ruoyi.other.vo.ShopCommissionStatisticsVO; import org.springframework.stereotype.Service; +import org.springframework.util.CollectionUtils; import javax.annotation.Resource; import java.util.List; @@ -52,17 +53,7 @@ .add(shopCommissionStatisticsVO.getTotalSubordinateCommission()) .add(shopCommissionStatisticsVO.getTotalServiceCharge())); - IPage<ShopBalanceStatement> statementIPage = page(page, new LambdaQueryWrapper<ShopBalanceStatement>()); - List<ShopBalanceStatement> records = statementIPage.getRecords(); - List<Integer> shopIds = records.stream().map(ShopBalanceStatement::getShopId).collect(Collectors.toList()); - List<Shop> shopList = shopService.listByIds(shopIds); - records.forEach(st -> { - shopList.stream().filter(shop -> shop.getId().equals(st.getShopId())).findFirst().ifPresent(shop -> { - st.setShopName(shop.getName()); - st.setShopManagerName(shop.getShopManager()); - st.setPhone(shop.getPhone()); - }); - }); + IPage<ShopBalanceStatement> statementIPage = this.baseMapper.queryShopBalanceStatementPage(page, shopBalanceStatement); shopCommissionStatisticsVO.setStatementIPage(statementIPage); return shopCommissionStatisticsVO; } -- Gitblit v1.7.1