From 8ea20b8394fb607fff01adddc860781cae6b8ae4 Mon Sep 17 00:00:00 2001 From: SongZhang <2064194730@qq.com> Date: Wed, 14 Aug 2024 14:56:39 +0800 Subject: [PATCH] =?UTF-8?q?1.=E9=81=BF=E5=85=8D=E9=87=8D=E5=A4=8D=E6=B6=88?= =?UTF-8?q?=E6=81=AF=E6=8E=A8=E9=80=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../system/cashierservice/wxUtil/WxAccountUtil.java | 5 +++++ 1 file changed, 5 insertions(+) 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);