From 0ce1f94a0f262a8831f8eb9fd5cf67422dd1d69b Mon Sep 17 00:00:00 2001 From: puzhibing <393733352@qq.com> Date: 星期五, 27 九月 2024 12:07:38 +0800 Subject: [PATCH] 合併代碼 --- ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TShoppingOrderController.java | 29 +++++++++++++++++++++-------- 1 files changed, 21 insertions(+), 8 deletions(-) diff --git a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TShoppingOrderController.java b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TShoppingOrderController.java index 6f50e62..21e8165 100644 --- a/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TShoppingOrderController.java +++ b/ruoyi-service/ruoyi-order/src/main/java/com/ruoyi/order/controller/TShoppingOrderController.java @@ -20,6 +20,8 @@ import com.ruoyi.order.api.query.ShoppingOrderQuery; import com.ruoyi.order.dto.*; import com.ruoyi.order.service.TShoppingOrderService; +import com.ruoyi.other.api.domain.TCoupon; +import com.ruoyi.other.api.domain.TGoods; import com.ruoyi.other.api.feignClient.CouponClient; import com.ruoyi.other.api.feignClient.GoodsClient; import com.ruoyi.payment.api.feignClient.AliPaymentClient; @@ -118,6 +120,17 @@ byId.setReceivingName(data.getName() + "-" + data.getPhone()); byId.setReceivingAddress(data.getAddress()); } + } + if (byId.getOrderType()==1){ + TGoods data = goodsClient.getGoodsById(byId.getGoodsId()).getData(); + if (data!=null){ + byId.setName(data.getName()); + } + }else { + TCoupon data = couponClient.getCouponById1(byId.getCouponId()).getData(); + if (data!=null){ + byId.setName(data.getName()); + } } return AjaxResult.success(byId); } @@ -261,14 +274,14 @@ */ @PostMapping("/cancelShoppingOrderWxRefund") public void cancelShoppingOrderWxRefund(HttpServletRequest request) { - WxRefundNotifyResp data = wxPaymentClient.refundNotify(request).getData(); - if (null != data) { - String out_refund_no = data.getOut_refund_no(); - String refund_id = data.getRefund_id(); - String tradeState = data.getTradeState(); - String success_time = data.getSuccess_time(); - shoppingOrderService.cancelShoppingOrderWxRefund(out_refund_no, refund_id, tradeState, success_time); - } +// WxRefundNotifyResp data = wxPaymentClient.refundNotify(request).getData(); +// if (null != data) { +// String out_refund_no = data.getOut_refund_no(); +// String refund_id = data.getRefund_id(); +// String tradeState = data.getTradeState(); +// String success_time = data.getSuccess_time(); +// shoppingOrderService.cancelShoppingOrderWxRefund(out_refund_no, refund_id, tradeState, success_time); +// } } -- Gitblit v1.7.1