| | |
| | | RefundPass one = refundPassService.lambdaQuery().eq(RefundPass::getOrderId, orderPageListVo.getId()).one(); |
| | | orderPageListVo.setRefundPassId(null != one ? one.getId().toString() : null); |
| | | |
| | | List<OrderGood> orderGoods = orderGoodMapper.selectList(new LambdaQueryWrapper<OrderGood>() |
| | | .eq(OrderGood::getOrderId, orderPageListVo.getId())); |
| | | BigDecimal servuceShopCharges = BigDecimal.ZERO; |
| | | BigDecimal boundShopCharges = BigDecimal.ZERO; |
| | | for (OrderGood orderGood : orderGoods) { |
| | | if(orderPageListVo.getShopId().equals(orderPageList.getShopId())){ |
| | | servuceShopCharges = servuceShopCharges.add(orderGood.getServuceShopCharges()); |
| | | } |
| | | boundShopCharges = boundShopCharges.add(orderGood.getBoundShopCharges()); |
| | | } |
| | | orderPageListVo.setGetCommission(servuceShopCharges.add(boundShopCharges)); |
| | | // 平台分佣 |
| | | List<ShopBalanceStatement> data = shopBalanceStatementClient.getShopBalanceStatementList(Arrays.asList(1, 2, 3), Long.valueOf(orderPageListVo.getId())).getData(); |
| | | BigDecimal reduce = data.stream().map(ShopBalanceStatement::getVariableAmount).reduce(BigDecimal.ZERO, BigDecimal::add); |
| | | orderPageListVo.setGetCommission(reduce); |
| | | } |
| | | return pageInfo.setRecords(list); |
| | | } |