ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/WithdrawController.java
@@ -321,7 +321,7 @@ withdrawDetailVO.setServeId(order.getServeId()); withdrawDetailVO.setServeName(order.getServeName()); withdrawDetailVO.setServePrice(order.getServePrice()); withdrawDetailVO.setOrderMoney(order.getSubsidy()!=null?order.getSubsidy().add(order.getOrderMoney()):order.getOrderMoney()); withdrawDetailVO.setOrderMoney(order.getOrderMoney()); withdrawDetailVO.setReservationName(order.getReservationName()); withdrawDetailVO.setReservationPhone(order.getReservationPhone()); withdrawDetailVO.setReservationAddress(order.getReservationAddress()); ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/WithdrawServiceImpl.java
@@ -242,7 +242,7 @@ withdraw.setUserId(userId); withdraw.setUserPhone(userPhone); withdraw.setApplyForTime(new Date()); withdraw.setApplyForMoney(order.getSubsidy()!=null?order.getSubsidy().add(order.getOrderMoney()):order.getOrderMoney()); withdraw.setApplyForMoney(order.getOrderMoney()); withdraw.setOrderId(orderId); withdraw.setCityCode(order.getCityCode()); @@ -252,7 +252,7 @@ // 已通过 withdraw.setState(Constants.ONE); // 商家微信打款至微信零钱 boolean update = weChatPay(order.getSubsidy()!=null?order.getSubsidy().add(order.getOrderMoney()):order.getOrderMoney(), openId,withdraw.getId(),order.getServerName()); boolean update = weChatPay(order.getOrderMoney(), openId,withdraw.getId(),order.getServerName()); // if (!update) { // throw new GlobalException("交易提现失败,请检查是否绑定微信!"); // } ruoyi-service/ruoyi-user/src/main/java/com/ruoyi/user/service/impl/WithdrawServiceImpl.java
@@ -53,20 +53,12 @@ if (!orderList.getRecords().isEmpty()) { // 总金额 totalMoney = orderList.getRecords().stream().map(Order::getOrderMoney).reduce(BigDecimal.ZERO, BigDecimal::add); BigDecimal reduce = orderList.getRecords().stream().map(Order::getSubsidy).reduce(BigDecimal.ZERO, BigDecimal::add); totalMoney = reduce.add(totalMoney); // 未提现金额withdrawn withdrawn = orderList.getRecords().stream().filter(data -> Constants.ZERO.equals(data.getIsWithdrawal())) .map(Order::getOrderMoney).reduce(BigDecimal.ZERO, BigDecimal::add); BigDecimal reduce1 = orderList.getRecords().stream().filter(data -> Constants.ZERO.equals(data.getIsWithdrawal())) .map(Order::getSubsidy).reduce(BigDecimal.ZERO, BigDecimal::add); withdrawn = reduce1.add(withdrawn); // 已提现金额 undelivered = orderList.getRecords().stream().filter(data -> Constants.ONE.equals(data.getIsWithdrawal())) .map(Order::getOrderMoney).reduce(BigDecimal.ZERO, BigDecimal::add); BigDecimal reduce2 = orderList.getRecords().stream().filter(data -> Constants.ONE.equals(data.getIsWithdrawal())) .map(Order::getSubsidy).reduce(BigDecimal.ZERO, BigDecimal::add); undelivered = reduce2.add(undelivered); } withdrawList.setMoneyCount(new WithdrawMoneyVO(totalMoney, undelivered, withdrawn)); // 回收服务列表 @@ -89,7 +81,7 @@ withdrawOrder.setCover(recoveryServe.getCover()); withdrawOrder.setCompleteTime(order.getCreateTime()); withdrawOrder.setIsWithdrawal(order.getIsWithdrawal()); withdrawOrder.setMoney(order.getSubsidy()!=null?order.getSubsidy().add(order.getOrderMoney()):order.getOrderMoney()); withdrawOrder.setMoney(order.getOrderMoney()); withdrawOrder.setPackageInfo(order.getPackageInfo()); if (order.getAddress()!=null) { withdrawOrder.setAddress(order.getReservationAddress() + order.getAddress());