| | |
| | | throw new FebsException("购买商品或sku不存在"); |
| | | } |
| | | |
| | | if (sku.getStock() < mallOrderItem.getCnt()) { |
| | | throw new FebsException(sku.getSkuName() + "库存不足"); |
| | | } |
| | | // if (sku.getStock() < mallOrderItem.getCnt()) { |
| | | // throw new FebsException(sku.getSkuName() + "库存不足"); |
| | | // } |
| | | |
| | | MallGoods mallGoods = mallGoodsMapper.selectById(sku.getGoodsId()); |
| | | Integer goodsResult = mallGoodsMapper.updateStockAndVolumeByGoodsId(mallGoods.getId(), mallOrderItem.getCnt()); |
| | |
| | | throw new FebsException("购买商品或sku不存在"); |
| | | } |
| | | |
| | | if (sku.getStock() < mallOrderItem.getCnt()) { |
| | | throw new FebsException(sku.getSkuName() + "库存不足"); |
| | | } |
| | | // if (sku.getStock() < mallOrderItem.getCnt()) { |
| | | // throw new FebsException(sku.getSkuName() + "库存不足"); |
| | | // } |
| | | |
| | | MallGoods mallGoods = mallGoodsMapper.selectById(sku.getGoodsId()); |
| | | Integer goodsResult = mallGoodsMapper.updateStockAndVolumeByGoodsId(mallGoods.getId(), mallOrderItem.getCnt()); |