From 3e64a254550804933633fd88182f20d43dd2e718 Mon Sep 17 00:00:00 2001
From: xin <1099200748@qq.com>
Date: Thu, 25 Sep 2025 21:51:55 +0800
Subject: [PATCH] 订单-汇旺财多账户支付配置

---
 oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderReturnServiceImpl.java |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderReturnServiceImpl.java b/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderReturnServiceImpl.java
index 8ed6275..a4d2a31 100644
--- a/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderReturnServiceImpl.java
+++ b/oying-system/src/main/java/com/oying/modules/sh/service/impl/OrderReturnServiceImpl.java
@@ -2,6 +2,7 @@
 
 import com.oying.exception.BadRequestException;
 import com.oying.modules.hwc.service.SwiftPassService;
+import com.oying.modules.pc.product.service.ProductInventoryService;
 import com.oying.modules.sh.domain.Order;
 import com.oying.modules.sh.domain.OrderProductSnapshot;
 import com.oying.modules.sh.domain.OrderReturn;
@@ -46,6 +47,7 @@
     private final RedisUtils redisUtils;
     private final SwiftPassService swiftPassService;
     private final OrderAddressSnapshotService addressSnapshotService;
+    private final ProductInventoryService productInventoryService;
     private static final String ORDER_RETURN_KEY = "oying:order:refund";
     private static final String ORDER_CODE = "REFUND";
     public static final Integer DAY = 30;
@@ -212,6 +214,7 @@
                 switch (status) {
                     case HWC:
                     case HWC2:
+                    case HWC3:
                         if (refund > 0) {
                             Map<String, String> re = swiftPassService.refund(orderReturn.getReturnNum(), orderReturn.getOrderNum(),
                                     resources.getMessage(), refund, total, status);
@@ -221,6 +224,9 @@
                     default:
                         throw new BadRequestException("暂未开通其余支付模式");
                 }
+                for (OrderReturnProductSnapshot snapshot : orderReturn.getProductSnapshots()) {
+                    productInventoryService.increaseStock(snapshot.getProductId(), snapshot.getDetailCount());
+                }
                 break;
             default:
                 throw new BadRequestException("审核状态错误");

--
Gitblit v1.9.3