商品模块代码提交
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();
|
List<Long> list = skuList.stream().map(ProdSkuDTO::getId).filter(Objects::nonNull).distinct().toList();
|
||||||
skuIdList.removeAll(list);
|
skuIdList.removeAll(list);
|
||||||
}
|
}
|
||||||
// 逻辑删除无用的SKU数据
|
if (CollUtil.isNotEmpty(skuIdList)) {
|
||||||
UpdateChain.of(ProdSku.class)
|
// 逻辑删除无用的SKU数据
|
||||||
.set(ProdSku::getIsDel, DeleteEnum.DELETED.value())
|
UpdateChain.of(ProdSku.class)
|
||||||
.in(ProdSku::getId, skuIdList)
|
.set(ProdSku::getIsDel, DeleteEnum.DELETED.value())
|
||||||
.eq(ProdSku::getShopId, shopId)
|
.in(ProdSku::getId, skuIdList)
|
||||||
.update();
|
.eq(ProdSku::getShopId, shopId)
|
||||||
|
.update();
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user