| | |
| | | .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; |
| | | } |