商品售罄开关

This commit is contained in:
2026-04-27 17:23:01 +08:00
parent 604a42fa4d
commit 680684e31a
2 changed files with 5 additions and 0 deletions

View File

@@ -64,6 +64,10 @@ public class ShopProductInfoVo implements Serializable {
* 是否售罄 1-是 0-否
*/
private Integer isSoldStock;
/**
* 是否自动售罄 1-是 0-否
*/
private Integer isAutoSoldStock;
/**
* 库存数量
*/

View File

@@ -717,6 +717,7 @@ public class ProductServiceImpl extends ServiceImpl<ProductMapper, Product> impl
Product update = new Product();
update.setIsAutoSoldStock(param.getIsAutoSoldStock());
update(update, query().eq(Product::getId, param.getId()).eq(Product::getShopId, shopId));
clearProductCache(entity.getCategoryId());
}