菠萝派接口-同步库存,库存必须大于或等于0
正在显示
1 个修改的文件
包含
5 行增加
和
0 行删除
... | @@ -39,6 +39,11 @@ public class SyncStockBizServiceImpl extends AbstractBizService<PineappleSyncSto | ... | @@ -39,6 +39,11 @@ public class SyncStockBizServiceImpl extends AbstractBizService<PineappleSyncSto |
39 | //先判断SKU在判断产品 | 39 | //先判断SKU在判断产品 |
40 | IMProductBean iMProductBean = pineappleDao.getIMProductBeanByMap(params); | 40 | IMProductBean iMProductBean = pineappleDao.getIMProductBeanByMap(params); |
41 | if(!StringUtil.isNull(iMProductBean)){ | 41 | if(!StringUtil.isNull(iMProductBean)){ |
42 | if(callRequest.getBizModel().getQuantity() < 0){ | ||
43 | log.error(String.format("菠萝派商城appkey[%s]更新库存失败,库存必须大于或等于0,method:%s,PlatProductID:%s,SkuID:s%,Quantity:%s",callRequest.getRequest().getAppkey(),callRequest.getRequest().getMethod(),callRequest.getBizModel().getPlatProductID(),callRequest.getBizModel().getSkuID(),callRequest.getBizModel().getQuantity())); | ||
44 | throw new BizException(String.format("菠萝派商城appkey[%s]更新库存失败,库存必须大于或等于0,method:%s,PlatProductID:%s,SkuID:s%,Quantity:%s",callRequest.getRequest().getAppkey(),callRequest.getRequest().getMethod(),callRequest.getBizModel().getPlatProductID(),callRequest.getBizModel().getSkuID(),callRequest.getBizModel().getQuantity())); | ||
45 | |||
46 | } | ||
42 | if(!StringUtil.isNull(callRequest.getBizModel().getSkuID()) ) { | 47 | if(!StringUtil.isNull(callRequest.getBizModel().getSkuID()) ) { |
43 | params.put("skuId",callRequest.getBizModel().getSkuID()); | 48 | params.put("skuId",callRequest.getBizModel().getSkuID()); |
44 | //查询该条SKUi | 49 | //查询该条SKUi | ... | ... |
-
请 注册 或 登录 后发表评论