phpcjl
2024-12-18 9292f925e97bc426c7b58d022b0db9a0d2034246
ruoyi-service/ruoyi-other/src/main/java/com/ruoyi/other/service/impl/ShopBalanceStatementServiceImpl.java
@@ -53,19 +53,7 @@
                .add(shopCommissionStatisticsVO.getTotalSubordinateCommission())
                .add(shopCommissionStatisticsVO.getTotalServiceCharge()));
        IPage<ShopBalanceStatement> statementIPage = page(page, new LambdaQueryWrapper<ShopBalanceStatement>());
        List<ShopBalanceStatement> records = statementIPage.getRecords();
        if (!CollectionUtils.isEmpty(records)){
            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;
    }