无关风月
2025-02-21 ae76f22f897cfd438b30829326b6ad36a80eaac0
ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/service/impl/TShoppingOrderServiceImpl.java
@@ -187,7 +187,15 @@
                    break;
            }
        }
        List<Long> appUserIds = list.stream().map(TActivityStatisticslVO::getAppUserId).collect(Collectors.toList());
        List<TAppUser> appUsers = appUserClient.getUserByIds(appUserIds).getData();
        for (TActivityStatisticslVO tActivityStatisticslVO : list) {
            TAppUser appUser = appUsers.stream().filter(user -> user.getId().equals(tActivityStatisticslVO.getAppUserId())).findFirst().orElse(null);
            if(Objects.nonNull(appUser)){
                tActivityStatisticslVO.setPhone(appUser.getPhone());
            }
            // 判断享有了哪些类型
            switch (tActivityStatisticslVO.getOrderType()){
                case 1:
@@ -443,10 +451,16 @@
            amount.setTotal(shoppingOrder.getPaymentAmount().multiply(new BigDecimal(100)).intValue());
            amount.setCurrency("CNY");
            model.setAmount(amount);
            R<String> orderR = wxPaymentClient.refundOrderR(model);
            R<Map<String, Object>> orderR = wxPaymentClient.refundOrderR(model);
            if(200 == orderR.getCode()){
                this.updateById(shoppingOrder);
                shoppingOrderRefundService.save(shoppingOrderRefund);
                //手续费
                Map<String, Object> amount1 = (Map<String, Object>) orderR.getData().get("amount");
                Object refund_fee1 = amount1.get("refund_fee");
                BigDecimal refund_fee = new BigDecimal(null == refund_fee1 ? "0" : refund_fee1.toString()).divide(new BigDecimal(100));
                shoppingOrderRefund.setRefundFee(refund_fee);
                shoppingOrderRefundService.updateById(shoppingOrderRefund);
            }
        }
        if(2 == paymentType){