From a71e1d121a0c12705f051ca2e56ad5c5ee450750 Mon Sep 17 00:00:00 2001 From: wangw <1594593906@qq.com> Date: Fri, 29 Nov 2024 11:07:55 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=20skuResult?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../mybatis/service/impl/TbShopSyncInfoServiceImpl.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/service/impl/TbShopSyncInfoServiceImpl.java b/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/service/impl/TbShopSyncInfoServiceImpl.java index 52b65288..08493270 100644 --- a/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/service/impl/TbShopSyncInfoServiceImpl.java +++ b/eladmin-system/src/main/java/cn/ysk/cashier/mybatis/service/impl/TbShopSyncInfoServiceImpl.java @@ -216,7 +216,8 @@ public class TbShopSyncInfoServiceImpl extends ServiceImpl products = productRepository.selectByShopId(tbShopSyncInfo.getPointShopId().toString()); - products.stream().map(TbProduct::getId).collect(Collectors.toList()).forEach(id -> skuResultRepository.deleteById(id)); + List collect = products.stream().map(TbProduct::getId).collect(Collectors.toList()); + skuResultRepository.deleteAllByIdInBatch(collect); productRepository.clearShopPro(tbShopSyncInfo.getPointShopId().toString()); skuRepository.clearShopSku(tbShopSyncInfo.getPointShopId().toString()); consRepository.clearShopCons(tbShopSyncInfo.getPointShopId());