Sfoglia il codice sorgente

1.更新商品代码

donglang 2 mesi fa
parent
commit
8c76a53d80

+ 0 - 3
sckw-modules/sckw-product/src/main/java/com/sckw/product/service/KwpGoodsService.java

@@ -750,9 +750,6 @@ public class KwpGoodsService {
         if (Objects.equals(GoodsStatusEnum.PUT_ON_SHELVES.getCode(), goods.getStatus())) {
             throw new BusinessException("上架操作仅针对“已下架”“草稿”状态的单据!");
         }
-        if (goods.getAmount().compareTo(BigDecimal.ZERO) <= 0) {
-            throw new BusinessException("商品上架必须库存大于零!");
-        }
         if (Objects.equals(GoodsStatusEnum.SAVED.getCode(), goods.getStatus())) {
             UpdateGoodsParam updateParam = BeanUtils.copyProperties(goods, UpdateGoodsParam.class);
             updateParam.setAttributes(BeanUtils.copyToList(kwpGoodsAttributeService.getByGoodsId(id), GoodsAttributes.class));