删除 skuResult

This commit is contained in:
2024-11-29 11:07:55 +08:00
parent aadecccbe2
commit a71e1d121a

View File

@@ -216,7 +216,8 @@ public class TbShopSyncInfoServiceImpl extends ServiceImpl<TbShopSyncInfoMapper,
groupRepository.clearShopGroup(tbShopSyncInfo.getPointShopId());
categoryRepository.clearShopCategory(tbShopSyncInfo.getPointShopId().toString());
List<TbProduct> products = productRepository.selectByShopId(tbShopSyncInfo.getPointShopId().toString());
products.stream().map(TbProduct::getId).collect(Collectors.toList()).forEach(id -> skuResultRepository.deleteById(id));
List<Integer> 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());