1.消息推送校验店铺状态
This commit is contained in:
@@ -341,9 +341,9 @@ public class CartService {
|
||||
shopOpenIds.forEach(item -> {
|
||||
String message = redisUtil.getMessage(RedisCst.SEND_STOCK_WARN_MSG + product.getId() + ":" + item.getOpenId());
|
||||
if (message == null) {
|
||||
WxAccountUtil.sendStockWarnMsg("商品库存不足", product.getName(),
|
||||
wxAccountUtil.sendStockWarnMsg("商品库存不足", product.getName(),
|
||||
product.getIsDistribute() == 1 ? product.getStockNumber() - num : (int) (productSku.getStockNumber() - num)
|
||||
, item.getOpenId());
|
||||
, item.getOpenId(), ShopWxMsgTypeEnum.STOCK_MSG, shopInfo.getId());
|
||||
redisUtil.saveMessage(RedisCst.SEND_STOCK_WARN_MSG + product.getId() + ":" + item.getOpenId(), product.getId().toString(), 60 * 30L);
|
||||
}else {
|
||||
log.info("{}已在30分钟内推送过消息,跳过发送", item.getOpenId());
|
||||
|
||||
Reference in New Issue
Block a user