diff --git a/src/main/java/com/chaozhanggui/system/cashierservice/wxUtil/WxAccountUtil.java b/src/main/java/com/chaozhanggui/system/cashierservice/wxUtil/WxAccountUtil.java index 245130e..73baaa9 100644 --- a/src/main/java/com/chaozhanggui/system/cashierservice/wxUtil/WxAccountUtil.java +++ b/src/main/java/com/chaozhanggui/system/cashierservice/wxUtil/WxAccountUtil.java @@ -104,6 +104,11 @@ public class WxAccountUtil { } public JSONObject sendStockWarnMsg(String shopName, String productName, Integer stock, String toUserOpenId, ShopWxMsgTypeEnum typeEnum, Integer shopId) { + TbShopMsgState allState = shopMsgStateMapper.selectByType(ShopWxMsgTypeEnum.ALL_MSG.getType(), shopId); + if (allState == null || allState.getState().equals(0)) { + log.info("店铺未开启全局推送:{}", allState); + return null; + } TbShopMsgState shopMsgState = shopMsgStateMapper.selectByType(typeEnum.getType(), shopId); if (shopMsgState == null || shopMsgState.getState().equals(0)) { log.info("店铺未开启推送:{}", shopMsgState);