| | |
| | | List<UserProfitPageListVo> profitPageListVos = this.baseMapper.profitUserPageList(page,query, sTime, eTime); |
| | | |
| | | |
| | | if(!profitPageListVos.isEmpty()){ |
| | | List<Integer> orderIds = profitPageListVos.stream().map(UserProfitPageListVo::getId).collect(Collectors.toList()); |
| | | List<TCommissionTransactionFlow> tCommissionTransactionFlows = commissionTransactionFlowMapper.selectList(new LambdaQueryWrapper<TCommissionTransactionFlow>().in(TCommissionTransactionFlow::getOrderId, orderIds)); |
| | | for (UserProfitPageListVo profitPageListVo : profitPageListVos) { |
| | | List<TCommissionTransactionFlow> flows = tCommissionTransactionFlows.stream().filter(e -> e.getOrderId().equals(profitPageListVo.getId()) && e.getAppUserId().equals(query.getUserId())).collect(Collectors.toList()); |
| | | profitPageListVo.setSelfProfit(flows.stream().map(TCommissionTransactionFlow::getCommissionAmount).reduce(BigDecimal.ZERO,BigDecimal::add)); |
| | | } |
| | | } |
| | | // if(!profitPageListVos.isEmpty()){ |
| | | // List<Integer> orderIds = profitPageListVos.stream().map(UserProfitPageListVo::getId).collect(Collectors.toList()); |
| | | // List<TCommissionTransactionFlow> tCommissionTransactionFlows = commissionTransactionFlowMapper.selectList(new LambdaQueryWrapper<TCommissionTransactionFlow>().in(TCommissionTransactionFlow::getOrderId, orderIds)); |
| | | // for (UserProfitPageListVo profitPageListVo : profitPageListVos) { |
| | | // List<TCommissionTransactionFlow> flows = tCommissionTransactionFlows.stream().filter(e -> e.getOrderId().equals(profitPageListVo.getId()) && e.getAppUserId().equals(query.getUserId())).collect(Collectors.toList()); |
| | | // profitPageListVo.setSelfProfit(flows.stream().map(TCommissionTransactionFlow::getCommissionAmount).reduce(BigDecimal.ZERO,BigDecimal::add)); |
| | | // } |
| | | // } |
| | | |
| | | return profitPageListVos; |
| | | } |