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);