| | |
| | | import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsSetPayService;
|
| | | import com.yeshi.fanli.service.inter.shop.BanLiShopGoodsSetService;
|
| | | import com.yeshi.fanli.service.inter.shop.BanLiShopOrderService;
|
| | | import com.yeshi.fanli.service.manger.msg.RocketMQManager;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.factory.RedPackDetailFactory;
|
| | | import com.yeshi.fanli.util.rocketmq.MQMsgBodyFactory;
|
| | |
| | | @Resource
|
| | | private RedPackBalanceService redPackBalanceService;
|
| | |
|
| | | @Resource(name = "producer")
|
| | | private Producer producer;
|
| | | @Resource
|
| | | private RocketMQManager rocketMQManager;
|
| | |
|
| | | @Resource
|
| | | private MQUnSendInfoService mqUnSendInfoService;
|
| | |
| | | msg.setKey(orderId + "");
|
| | | long delayTime = System.currentTimeMillis() + (Constant.IS_TEST ? 1000 * 30L : 1000 * 60 * 10);// 10分钟后通知
|
| | | msg.setStartDeliverTime(delayTime);
|
| | | SendResult sendResult = producer.send(msg);
|
| | | |
| | | SendResult sendResult = rocketMQManager.sendNormalMsg(msg, Constant.IS_TEST ? 1000 * 30L : 1000 * 60 * 10L, orderId + "");
|
| | | if (sendResult == null) {
|
| | | MQUnSendInfo info = new MQUnSendInfo();
|
| | | info.setBody(new String(msg.getBody()));
|
| | |
| | | BanLiShopOrderMQMsg msg = new BanLiShopOrderMQMsg(order.getId(), order.getUid());
|
| | | Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_ORDER,
|
| | | OrderTopicTagEnum.banLiShopOrderPaid, msg);
|
| | | producer.send(message);
|
| | | rocketMQManager.sendNormalMsg(message, null);
|
| | | return;
|
| | | }
|
| | |
|