1.推送校验状态

This commit is contained in:
2024-08-14 14:58:50 +08:00
parent 5a0112132d
commit b0243a9ddd
6 changed files with 20 additions and 7 deletions

View File

@@ -101,6 +101,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);