该商品未开启库存管理,暂不支持修改库存

This commit is contained in:
Tankaikai 2025-03-25 11:14:17 +08:00
parent 1490bf0cdb
commit a1b16bd2b0
1 changed files with 1 additions and 1 deletions

View File

@ -363,7 +363,7 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
public void updateProductStock(ProductModifyStockParam param) { public void updateProductStock(ProductModifyStockParam param) {
Product entity = super.getById(param.getId()); Product entity = super.getById(param.getId());
if (entity.getIsStock() == YesNoEnum.NO.value()) { if (entity.getIsStock() == YesNoEnum.NO.value()) {
return; throw new CzgException("该商品未开启库存管理,暂不支持修改库存");
} }
if (!entity.getShopId().equals(param.getShopId())) { if (!entity.getShopId().equals(param.getShopId())) {
return; return;