1.耗材预警推送修复

This commit is contained in:
SongZhang 2024-07-25 14:47:21 +08:00
parent b864c24f2f
commit 94fcc2ae09
1 changed files with 6 additions and 4 deletions

View File

@ -127,10 +127,12 @@ public class ConsMsgConsumer {
String value = redisUtil.getMessage(key);
log.info("redis_key:{}",value);
if (Objects.isNull(value)) {
wxAccountUtil.sendStockWarnMsg(shopInfo.getShopName(), "耗材库存不足: " + tbConsInfo.getConName(),
tbConsInfo.getStockNumber().subtract(tbConsInfo.getStockConsume()).setScale(2,BigDecimal.ROUND_DOWN).toPlainString(), tbUserShopMsg.getOpenId());
log.info("写入redis:{}",key);
redisUtil.saveMessage(key, "1", 10 * 60);
JSONObject jsonObject = wxAccountUtil.sendStockWarnMsg(shopInfo.getShopName(), "耗材:" + tbConsInfo.getConName(),
tbConsInfo.getStockNumber().subtract(tbConsInfo.getStockConsume()).setScale(2, BigDecimal.ROUND_DOWN).toPlainString(), tbUserShopMsg.getOpenId());
if (jsonObject != null) {
log.info("写入redis:{}",key);
redisUtil.saveMessage(key, "1", 10 * 60);
}
}
});