1.避免重复消息推送
This commit is contained in:
@@ -104,6 +104,11 @@ public class WxAccountUtil {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public JSONObject sendStockWarnMsg(String shopName, String productName, Integer stock, String toUserOpenId, ShopWxMsgTypeEnum typeEnum, Integer shopId) {
|
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);
|
TbShopMsgState shopMsgState = shopMsgStateMapper.selectByType(typeEnum.getType(), shopId);
|
||||||
if (shopMsgState == null || shopMsgState.getState().equals(0)) {
|
if (shopMsgState == null || shopMsgState.getState().equals(0)) {
|
||||||
log.info("店铺未开启推送:{}", shopMsgState);
|
log.info("店铺未开启推送:{}", shopMsgState);
|
||||||
|
|||||||
Reference in New Issue
Block a user