1.推送校验状态
This commit is contained in:
@@ -123,7 +123,8 @@ public class ConsMsgConsumer {
|
||||
log.info("耗材名称: {}, conwarning:{},stockNumber:{}",tbConsInfo.getConName(),
|
||||
tbConsInfo.getConWarning(),tbConsInfo.getStockNumber().subtract(tbConsInfo.getStockConsume()));
|
||||
if (N.egt(tbConsInfo.getConWarning(), tbConsInfo.getStockNumber().subtract(tbConsInfo.getStockConsume()))) {
|
||||
List<TbShopOpenId> tbUserShopMsgs = shopOpenIdMapper.selectStateByShopIdAndType(product.getShopId(), ShopWxMsgTypeEnum.CONSUMABLES_MSG.getType());
|
||||
List<TbShopOpenId> tbUserShopMsgs = shopOpenIdMapper
|
||||
.selectStateByShopIdAndType(product.getShopId(), ShopWxMsgTypeEnum.CONSUMABLES_MSG.getType());
|
||||
log.info("待推送openId列表: {}", tbUserShopMsgs);
|
||||
if (Objects.nonNull(tbUserShopMsgs) && tbUserShopMsgs.size()>0) {
|
||||
tbUserShopMsgs.parallelStream().forEach(tbUserShopMsg->{
|
||||
@@ -133,7 +134,8 @@ public class ConsMsgConsumer {
|
||||
log.info("开始推送耗材模板消息,rediskey:{}", value);
|
||||
if (Objects.isNull(value)) {
|
||||
JSONObject jsonObject = wxAccountUtil.sendStockWarnMsg("耗材库存不足", tbConsInfo.getConName(),
|
||||
tbConsInfo.getStockNumber().subtract(tbConsInfo.getStockConsume()).toBigInteger().intValue(), tbUserShopMsg.getOpenId(), ShopWxMsgTypeEnum.CONSUMABLES_MSG, shopId);
|
||||
tbConsInfo.getStockNumber().subtract(tbConsInfo.getStockConsume()).toBigInteger().intValue(), tbUserShopMsg.getOpenId(),
|
||||
ShopWxMsgTypeEnum.CONSUMABLES_MSG, shopId);
|
||||
if (jsonObject != null) {
|
||||
log.info("写入redis:{}",key);
|
||||
redisUtil.saveMessage(key, "1", 30 * 60);
|
||||
|
||||
Reference in New Issue
Block a user