新增下单库存预警消息推送
This commit is contained in:
parent
c80d972fea
commit
47838fe10d
|
|
@ -105,6 +105,10 @@ public class CartService {
|
|||
PushToAppChannelHandlerAdapter.getInstance().AppSendInfo(jsonObject1.toString(), jsonObject.getString("tableId").concat("-").concat(shopId), "", false);
|
||||
}
|
||||
|
||||
/**
|
||||
* 加入购物车
|
||||
* @param jsonObject 商品信息
|
||||
*/
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
public void createCart(JSONObject jsonObject) {
|
||||
try {
|
||||
|
|
@ -321,12 +325,12 @@ public class CartService {
|
|||
product.setStockNumber(0);
|
||||
}
|
||||
if (
|
||||
(product.getIsDistribute() == 1 && productSku.getStockNumber() <= productSku.getWarnLine())
|
||||
|| (product.getIsDistribute() != 1) && product.getStockNumber() <= productSku.getWarnLine()
|
||||
(product.getIsDistribute() == 1 && product.getStockNumber() <= productSku.getWarnLine())
|
||||
|| (product.getIsDistribute() != 1) && productSku.getStockNumber() <= productSku.getWarnLine()
|
||||
) {
|
||||
TbUserShopMsg tbUserShopMsg = tbUserShopMsgMapper.selectByShopId(productSku.getShopId());
|
||||
wechatUtil.sendStockWarnMsg(shopInfo.getShopName(), product.getName(),
|
||||
product.getIsDistribute() == 1 ? productSku.getStockNumber().toString() : product.getStockNumber().toString(),
|
||||
product.getIsDistribute() == 1 ? product.getStockNumber().toString() : productSku.getStockNumber().toString(),
|
||||
"耗材库存不足,请及时补充。", tbUserShopMsg.getOpenId());
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue