1.模板消息负值不推送

This commit is contained in:
2024-07-25 17:06:07 +08:00
parent e4c3478f8e
commit de2300311d
2 changed files with 6 additions and 4 deletions

View File

@@ -483,7 +483,7 @@ public class CartService {
String message = redisUtil.getMessage(RedisCst.SEND_STOCK_WARN_MSG + product.getId() + ":" + item.getOpenId());
if (message == null) {
wxAccountUtil.sendStockWarnMsg("商品库存不足", product.getName(),
product.getIsDistribute() == 1 ? String.valueOf(product.getStockNumber() - num) : String.valueOf(productSku.getStockNumber() - num)
product.getIsDistribute() == 1 ? product.getStockNumber() - num : (int) (productSku.getStockNumber() - num)
, item.getOpenId());
redisUtil.saveMessage(RedisCst.SEND_STOCK_WARN_MSG + product.getId() + ":" + item.getOpenId(), product.getId().toString(), 60 * 30L);
}else {