商品模块代码提交
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user