From 99af352328c3de30e53945863d1326aaafd0d0b8 Mon Sep 17 00:00:00 2001 From: liyj <1617420630@qq.com> Date: Tue, 21 Oct 2025 15:15:09 +0800 Subject: [PATCH] =?UTF-8?q?=E6=80=9D=E8=BF=85=E5=90=8C=E6=AD=A5=E5=BA=93?= =?UTF-8?q?=E5=AD=98=E9=97=AE=E9=A2=98=E4=BF=AE=E6=94=B9=EF=BC=8C=E6=96=B0?= =?UTF-8?q?=E5=A2=9E=E5=8F=96=E6=B6=88=E8=AE=A2=E5=8D=95=E5=92=8C=E5=95=86?= =?UTF-8?q?=E5=AE=B6=E5=90=8C=E6=84=8F=E9=80=80=E8=B4=A7=E6=97=B6=E8=A7=A6?= =?UTF-8?q?=E5=8F=91=E5=BA=93=E5=AD=98=E5=9B=9E=E9=80=80=E5=88=B0=E6=80=9D?= =?UTF-8?q?=E8=BF=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/impl/ShopOrderReturnServiceImpl.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/mall-shop/src/main/java/com/suisung/mall/shop/order/service/impl/ShopOrderReturnServiceImpl.java b/mall-shop/src/main/java/com/suisung/mall/shop/order/service/impl/ShopOrderReturnServiceImpl.java index 049413ae..de3b31b4 100644 --- a/mall-shop/src/main/java/com/suisung/mall/shop/order/service/impl/ShopOrderReturnServiceImpl.java +++ b/mall-shop/src/main/java/com/suisung/mall/shop/order/service/impl/ShopOrderReturnServiceImpl.java @@ -58,6 +58,7 @@ import com.suisung.mall.shop.sfexpress.service.SFExpressApiService; import com.suisung.mall.shop.store.service.ShopStoreBaseService; import com.suisung.mall.shop.store.service.ShopStoreConfigService; import com.suisung.mall.shop.store.service.ShopStoreShippingAddressService; +import com.suisung.mall.shop.sync.service.SyncThirdDataService; import io.seata.spring.annotation.GlobalTransactional; import lombok.extern.slf4j.Slf4j; import org.slf4j.Logger; @@ -203,6 +204,9 @@ public class ShopOrderReturnServiceImpl extends BaseServiceImpl> statisticState() { UserDto user = getCurrentUser(); @@ -1506,6 +1510,13 @@ public class ShopOrderReturnServiceImpl extends BaseServiceImpl stockDeltaMap = new HashMap<>(); + String item_src_id= productItem.getItem_src_id(); + stockDeltaMap.put(item_src_id + "-" + shopOrderItem.getOrder_id(), returnNum); + syncThirdDataService.incrProductStockToRedis(stockDeltaMap); + logger.info("退货返回给思迅,存入redis成功,item_src_id:{},订单号:{},数量:{}",item_src_id,shopOrderReturn.getOrder_id(),returnNum); } else { logger.warn("退货数量为空,无法增加库存,订单项ID: {}", orderItemId); }