From d47a5505318a5b9f01e5c2f0695389eafe384f13 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Wed, 15 Nov 2023 13:56:14 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../order/service/impl/OrderRefundServiceImpl.java | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/hai-service/src/main/java/com/hai/order/service/impl/OrderRefundServiceImpl.java b/hai-service/src/main/java/com/hai/order/service/impl/OrderRefundServiceImpl.java index 31e32b2e..1a5f6748 100644 --- a/hai-service/src/main/java/com/hai/order/service/impl/OrderRefundServiceImpl.java +++ b/hai-service/src/main/java/com/hai/order/service/impl/OrderRefundServiceImpl.java @@ -160,7 +160,19 @@ public class OrderRefundServiceImpl implements OrderRefundService { } // 第三方退款 - if (orderPayType.getNumber().equals(OrderPayType.PAY_TYPE2.getNumber())) { + if (orderPayType.getNumber().equals(OrderPayType.PAY_TYPE1.getNumber())) { + + if (order.getPayChannel() == 2) { + JSONObject object = huiConfig.refund(order); + + if (object.getString("return_code").equals("000000")) { + JSONObject jsonObject = object.getJSONObject("return_data"); + refundPriceModel.setRefundSuccess(true); + refundPriceModel.setThirdPartyRefundOrderNo(jsonObject.getString("refundTradeNo")); + } + } + + } else if (orderPayType.getNumber().equals(OrderPayType.PAY_TYPE2.getNumber())) { if (order.getPayChannel() == 2) { JSONObject object = huiConfig.refund(order);