From b5bee0652f70cbfa9704dce73576e4236d640040 Mon Sep 17 00:00:00 2001 From: Tankaikai Date: Tue, 4 Mar 2025 16:41:08 +0800 Subject: [PATCH] =?UTF-8?q?1.=20=E5=95=86=E5=93=81=E4=BF=A1=E6=81=AF?= =?UTF-8?q?=E5=8F=98=E5=8A=A8=E5=88=B7=E6=96=B0=E5=BA=93=E5=AD=98=202.=20?= =?UTF-8?q?=E5=95=86=E5=93=81=E4=BF=A1=E6=81=AF=E5=8F=98=E5=8A=A8=E5=8F=91?= =?UTF-8?q?=E7=94=9FMq=E6=B6=88=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../product/service/impl/ProductRpcServiceImpl.java | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/ProductRpcServiceImpl.java b/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/ProductRpcServiceImpl.java index 42e4da26..c29b724b 100644 --- a/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/ProductRpcServiceImpl.java +++ b/cash-service/product-service/src/main/java/com/czg/service/product/service/impl/ProductRpcServiceImpl.java @@ -3,6 +3,7 @@ package com.czg.service.product.service.impl; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.collection.CollUtil; import cn.hutool.core.convert.Convert; +import cn.hutool.core.thread.ThreadUtil; import cn.hutool.core.util.NumberUtil; import com.czg.config.RabbitPublisher; import com.czg.constant.CacheConstant; @@ -108,11 +109,9 @@ public class ProductRpcServiceImpl implements ProductRpcService { consStockFlowMapper.insert(consStockFlow); } } - /*try { + ThreadUtil.execAsync(() -> { rabbitPublisher.sendProductInfoChangeMsg(Convert.toStr(shopId)); - } catch (Exception e) { - log.error("发送商品信息变更Mq消息失败:", e); - }*/ + }); log.info("ProductService.--------------------------------------------库存更新成功"); }