修改耗材提醒

This commit is contained in:
牛叉闪闪 2024-07-15 15:27:31 +08:00
parent 2a28151139
commit c67d7f20a2
1 changed files with 2 additions and 6 deletions

View File

@ -119,10 +119,6 @@ public class ConsMsgConsumer {
List<TbUserShopMsg> tbUserShopMsgs = tbUserShopMsgMapper.selectAllByShopId(tbConsInfo.getShopId());
if (Objects.nonNull(tbUserShopMsgs) && tbUserShopMsgs.size()>0) {
tbUserShopMsgs.parallelStream().forEach(tbUserShopMsg->{
String key=RedisCst.ORDER_MESSAGE.concat(tbConsInfo.getShopId().toString()).concat("#").concat(tbConsInfo.getId().toString()).concat("#").concat(tbUserShopMsg.getOpenId());
String value = redisUtil.getMessage(key);
@ -150,7 +146,7 @@ public class ConsMsgConsumer {
JSONObject thing7 = new JSONObject();
thing7.put("value", tbConsInfo.getStockNumber().subtract(tbConsInfo.getStockConsume()).toPlainString());
thing7.put("value", tbConsInfo.getStockNumber().subtract(tbConsInfo.getStockConsume()).setScale(2,BigDecimal.ROUND_DOWN).toPlainString());
data.put("thing1", thing1);
data.put("thing6", thing6);
@ -163,7 +159,7 @@ public class ConsMsgConsumer {
object1.put("lang", "zh_CN");
String response = HttpRequest.post("https://api.weixin.qq.com/cgi-bin/message/subscribe/send?access_token=".concat(accessToken)).body(object1.toString()).execute().body();
log.info("openId:{},返回结果:{}",tbUserShopMsg.getOpenId(), response);
log.info("openId:{},请求参数:{},返回结果:{}",tbUserShopMsg.getOpenId(),object1.toString(), response);
JSONObject resObj = JSONObject.parseObject(response);
if (ObjectUtil.isNotEmpty(resObj) && ObjectUtil.isNotNull(resObj) && "0".equals(String.valueOf(resObj.get("errcode")))) {
log.info("写入redis:{}",key);