1.库存预警推送更改未公众号推送
This commit is contained in:
@@ -64,6 +64,8 @@ public class OrderService {
|
||||
@Autowired
|
||||
RedisUtil redisUtil;
|
||||
|
||||
private final WxAccountUtil wxAccountUtil;
|
||||
|
||||
@Autowired
|
||||
RabbitProducer producer;
|
||||
|
||||
@@ -79,7 +81,8 @@ public class OrderService {
|
||||
@Autowired
|
||||
private ProductService productService;
|
||||
|
||||
public OrderService(WechatUtil wechatUtil, TbUserShopMsgMapper tbUserShopMsgMapper, TbShopOpenIdMapper shopOpenIdMapper) {
|
||||
public OrderService(WxAccountUtil wxAccountUtil, WechatUtil wechatUtil, TbUserShopMsgMapper tbUserShopMsgMapper, TbShopOpenIdMapper shopOpenIdMapper) {
|
||||
this.wxAccountUtil = wxAccountUtil;
|
||||
this.wechatUtil = wechatUtil;
|
||||
this.tbUserShopMsgMapper = tbUserShopMsgMapper;
|
||||
this.shopOpenIdMapper = shopOpenIdMapper;
|
||||
@@ -277,9 +280,8 @@ public class OrderService {
|
||||
) {
|
||||
List<TbShopOpenId> shopOpenIds = shopOpenIdMapper.selectByShopId(Integer.valueOf(product.getShopId()));
|
||||
shopOpenIds.forEach(item -> {
|
||||
wechatUtil.sendStockWarnMsg(shopInfo.getShopName(), product.getName(),
|
||||
product.getIsDistribute() == 1 ? String.valueOf(product.getStockNumber()-num) : String.valueOf(productSku.getStockNumber() - num),
|
||||
"商品库存不足,请及时补充。", item.getOpenId());
|
||||
wxAccountUtil.sendStockWarnMsg(shopInfo.getShopName(), product.getName(),
|
||||
product.getIsDistribute() == 1 ? String.valueOf(product.getStockNumber()-num) : String.valueOf(productSku.getStockNumber() - num), item.getOpenId());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user