商品模块代码提交

This commit is contained in:
Tankaikai
2025-02-21 15:11:52 +08:00
parent 0e7475d894
commit 624635e6fa

View File

@@ -235,12 +235,14 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
List<Long> list = skuList.stream().map(ProdSkuDTO::getId).filter(Objects::nonNull).distinct().toList();
skuIdList.removeAll(list);
}
// 逻辑删除无用的SKU数据
UpdateChain.of(ProdSku.class)
.set(ProdSku::getIsDel, DeleteEnum.DELETED.value())
.in(ProdSku::getId, skuIdList)
.eq(ProdSku::getShopId, shopId)
.update();
if (CollUtil.isNotEmpty(skuIdList)) {
// 逻辑删除无用的SKU数据
UpdateChain.of(ProdSku.class)
.set(ProdSku::getIsDel, DeleteEnum.DELETED.value())
.in(ProdSku::getId, skuIdList)
.eq(ProdSku::getShopId, shopId)
.update();
}
return true;
}