From e0d464906ecef4c8b17675c32f3c0c486f499f65 Mon Sep 17 00:00:00 2001 From: Chopper711 Date: Mon, 28 Aug 2023 13:01:51 +0800 Subject: [PATCH 1/3] =?UTF-8?q?fix:=20minio=E7=BC=A9=E7=95=A5=E5=9B=BE?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E7=89=B9=E6=AE=8A=E9=85=8D=E7=BD=AE=EF=BC=8C?= =?UTF-8?q?=E8=BF=99=E9=87=8C=E9=BB=98=E8=AE=A4=E4=B8=8D=E5=8E=8B=E7=BC=A9?= =?UTF-8?q?=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../lili/modules/goods/serviceimpl/GoodsGalleryServiceImpl.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsGalleryServiceImpl.java b/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsGalleryServiceImpl.java index edeced2e..ba0a1f34 100644 --- a/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsGalleryServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsGalleryServiceImpl.java @@ -101,7 +101,7 @@ public class GoodsGalleryServiceImpl extends ServiceImpl Date: Tue, 29 Aug 2023 16:00:29 +0800 Subject: [PATCH 2/3] =?UTF-8?q?fix:=20=E5=95=86=E5=93=81=E6=89=B9=E9=87=8F?= =?UTF-8?q?=E8=AE=BE=E7=BD=AE=E7=89=A9=E6=B5=81=E6=A8=A1=E6=9D=BF=E6=97=B6?= =?UTF-8?q?=EF=BC=8C=E6=B2=A1=E6=9C=89=E5=88=A0=E9=99=A4=E7=BC=93=E5=AD=98?= =?UTF-8?q?=E9=97=AE=E9=A2=98=E5=A4=84=E7=90=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../modules/goods/serviceimpl/GoodsServiceImpl.java | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsServiceImpl.java b/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsServiceImpl.java index 601726c8..6029998a 100644 --- a/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/goods/serviceimpl/GoodsServiceImpl.java @@ -56,6 +56,7 @@ import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.util.*; +import java.util.stream.Collectors; /** * 商品业务层实现 @@ -426,7 +427,8 @@ public class GoodsServiceImpl extends ServiceImpl implements LambdaUpdateWrapper lambdaUpdateWrapper = Wrappers.lambdaUpdate(); lambdaUpdateWrapper.set(Goods::getTemplateId, templateId); lambdaUpdateWrapper.in(Goods::getId, goodsIds); - cache.multiDel(goodsIds); + List goodsCache = goodsIds.stream().map(item -> CachePrefix.GOODS.getPrefix() + item).collect(Collectors.toList()); + cache.multiDel(goodsCache); return this.update(lambdaUpdateWrapper); } @@ -548,7 +550,8 @@ public class GoodsServiceImpl extends ServiceImpl implements if (!GoodsStatusEnum.UPPER.name().equals(goods.getMarketEnable()) || !GoodsAuthEnum.PASS.name().equals(goods.getAuthFlag())) { return; } - applicationEventPublisher.publishEvent(new TransactionCommitSendMQEvent("生成商品", rocketmqCustomProperties.getGoodsTopic(), GoodsTagsEnum.GENERATOR_GOODS_INDEX.name(), goods.getId())); + applicationEventPublisher.publishEvent(new TransactionCommitSendMQEvent("生成商品", rocketmqCustomProperties.getGoodsTopic(), + GoodsTagsEnum.GENERATOR_GOODS_INDEX.name(), goods.getId())); } /** @@ -558,7 +561,8 @@ public class GoodsServiceImpl extends ServiceImpl implements */ @Transactional public void updateEsGoods(List goodsIds) { - applicationEventPublisher.publishEvent(new TransactionCommitSendMQEvent("更新商品", rocketmqCustomProperties.getGoodsTopic(), GoodsTagsEnum.UPDATE_GOODS_INDEX.name(), goodsIds)); + applicationEventPublisher.publishEvent(new TransactionCommitSendMQEvent("更新商品", rocketmqCustomProperties.getGoodsTopic(), + GoodsTagsEnum.UPDATE_GOODS_INDEX.name(), goodsIds)); } /** @@ -568,7 +572,8 @@ public class GoodsServiceImpl extends ServiceImpl implements */ @Transactional public void deleteEsGoods(List goodsIds) { - applicationEventPublisher.publishEvent(new TransactionCommitSendMQEvent("删除商品", rocketmqCustomProperties.getGoodsTopic(), GoodsTagsEnum.GOODS_DELETE.name(), JSONUtil.toJsonStr(goodsIds))); + applicationEventPublisher.publishEvent(new TransactionCommitSendMQEvent("删除商品", rocketmqCustomProperties.getGoodsTopic(), + GoodsTagsEnum.GOODS_DELETE.name(), JSONUtil.toJsonStr(goodsIds))); } /** From 7e70e7d6cdef637c8bcb82220bf79491f51abad1 Mon Sep 17 00:00:00 2001 From: Chopper711 Date: Mon, 11 Sep 2023 17:18:10 +0800 Subject: [PATCH 3/3] =?UTF-8?q?=E4=BC=98=E5=8C=96=E6=B3=A8=E9=87=8A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/main/java/cn/lili/common/utils/ThreadPoolUtil.java | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/framework/src/main/java/cn/lili/common/utils/ThreadPoolUtil.java b/framework/src/main/java/cn/lili/common/utils/ThreadPoolUtil.java index 5a62281a..eee0a12b 100644 --- a/framework/src/main/java/cn/lili/common/utils/ThreadPoolUtil.java +++ b/framework/src/main/java/cn/lili/common/utils/ThreadPoolUtil.java @@ -23,7 +23,8 @@ public class ThreadPoolUtil { * 线程缓冲队列 */ private static final BlockingQueue BQUEUE = new ArrayBlockingQueue(100); - private static final ThreadPoolExecutor POOL = new ThreadPoolExecutor(SIZE_CORE_POOL, SIZE_MAX_POOL, ALIVE_TIME, TimeUnit.MILLISECONDS, BQUEUE, new ThreadPoolExecutor.CallerRunsPolicy()); + private static final ThreadPoolExecutor POOL = new ThreadPoolExecutor(SIZE_CORE_POOL, SIZE_MAX_POOL, ALIVE_TIME, TimeUnit.MILLISECONDS, BQUEUE, + new ThreadPoolExecutor.CallerRunsPolicy()); /** * volatile禁止指令重排 */ @@ -34,7 +35,7 @@ public class ThreadPoolUtil { } /** - * 无返回值直接执行, 管他娘的 + * 执行方法 * * @param runnable */ @@ -43,7 +44,7 @@ public class ThreadPoolUtil { } /** - * 返回值直接执行, 管他娘的 + * 提交返回值 * * @param callable */