8.3
luodangjia
2024-08-03 67157345fe1878681e39ec186ef37ff6b3b5c1fc
ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/service/impl/WithdrawServiceImpl.java
@@ -53,11 +53,11 @@
        if (!orderList.getRecords().isEmpty()) {
            // 总金额
            totalMoney = orderList.getRecords().stream().map(Order::getOrderMoney).reduce(BigDecimal.ZERO, BigDecimal::add);
            // 未提现金额
            undelivered = orderList.getRecords().stream().filter(data -> Constants.ZERO.equals(data.getIsWithdrawal()))
            // 未提现金额withdrawn
            withdrawn = orderList.getRecords().stream().filter(data -> Constants.ZERO.equals(data.getIsWithdrawal()))
                    .map(Order::getOrderMoney).reduce(BigDecimal.ZERO, BigDecimal::add);
            // 已提现金额
            withdrawn = orderList.getRecords().stream().filter(data -> Constants.ONE.equals(data.getIsWithdrawal()))
            undelivered = orderList.getRecords().stream().filter(data -> Constants.ONE.equals(data.getIsWithdrawal()))
                    .map(Order::getOrderMoney).reduce(BigDecimal.ZERO, BigDecimal::add);
        }
        withdrawList.setMoneyCount(new WithdrawMoneyVO(totalMoney, undelivered, withdrawn));
@@ -79,9 +79,14 @@
            withdrawOrder.setServeName(recoveryServe.getServeName());
            withdrawOrder.setServeDescribe(recoveryServe.getServeDescribe());
            withdrawOrder.setCover(recoveryServe.getCover());
            withdrawOrder.setCompleteTime(order.getCompleteTime());
            withdrawOrder.setCompleteTime(order.getCreateTime());
            withdrawOrder.setIsWithdrawal(order.getIsWithdrawal());
            withdrawOrder.setMoney(order.getOrderMoney());
            if (order.getAddress()!=null) {
                withdrawOrder.setAddress(order.getReservationAddress() + order.getAddress());
            }else {
                withdrawOrder.setAddress(order.getReservationAddress());
            }
            list.add(withdrawOrder);
        }
        Page<WithdrawOrderVO> page = new Page<>();