|
@@ -3194,6 +3194,8 @@ public class LiveOrderServiceImpl implements ILiveOrderService {
|
|
|
if(goods == null) return R.error("当前商品不存在");
|
|
if(goods == null) return R.error("当前商品不存在");
|
|
|
if(fsStoreProduct == null) return R.error("店铺已下架商品,购买失败");
|
|
if(fsStoreProduct == null) return R.error("店铺已下架商品,购买失败");
|
|
|
if(fsStoreProduct.getIsShow() == 0 || goods.getStatus() == 0) return R.error("商品已下架,购买失败");
|
|
if(fsStoreProduct.getIsShow() == 0 || goods.getStatus() == 0) return R.error("商品已下架,购买失败");
|
|
|
|
|
+ if(liveOrder.getTotalNum() == null || StringUtils.isEmpty(liveOrder.getTotalNum())) liveOrder.setTotalNum("1");
|
|
|
|
|
+ if(goods.getStock() == null) return R.error("直播间商品库存不足");
|
|
|
if(fsStoreProduct.getStock() < Integer.parseInt(liveOrder.getTotalNum()) || goods.getStock() < Integer.parseInt(liveOrder.getTotalNum())) return R.error("抱歉,这款商品已被抢光,暂时无库存~");
|
|
if(fsStoreProduct.getStock() < Integer.parseInt(liveOrder.getTotalNum()) || goods.getStock() < Integer.parseInt(liveOrder.getTotalNum())) return R.error("抱歉,这款商品已被抢光,暂时无库存~");
|
|
|
|
|
|
|
|
// 更改店铺库存
|
|
// 更改店铺库存
|