From 8b2191df2f7d94aa299bd43dcbe97c94e5a61bbd Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期三, 20 十一月 2019 14:53:34 +0800 Subject: [PATCH] RocketMQ的消息整改 --- fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopOrderPayServiceImpl.java | 5 +++-- 1 files changed, 3 insertions(+), 2 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopOrderPayServiceImpl.java b/fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopOrderPayServiceImpl.java index 4825b64..f2e1da5 100644 --- a/fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopOrderPayServiceImpl.java +++ b/fanli/src/main/java/com/yeshi/fanli/service/impl/shop/BanLiShopOrderPayServiceImpl.java @@ -40,6 +40,7 @@ import com.yeshi.fanli.util.StringUtil; import com.yeshi.fanli.util.charge.FuLuChargeApiUtil; import com.yeshi.fanli.util.factory.RedPackDetailFactory; +import com.yeshi.fanli.util.rocketmq.MQMsgBodyFactory; import com.yeshi.fanli.util.rocketmq.MQTopicName; import com.yeshi.fanli.util.wx.BanLiShopWXPayUtil; @@ -210,8 +211,8 @@ order.setMoneyPaymentState(BanLiShopOrder.PAY_STATE_REFUNDING); // 鍙戦�侀��娆炬秷鎭� BanLiShopOrderMQMsg msg = new BanLiShopOrderMQMsg(order.getId(), order.getUid()); - Message message = new Message(MQTopicName.TOPIC_ORDER.name(), - OrderTopicTagEnum.banLiShopOrderRefund.name(), new Gson().toJson(msg).getBytes()); + Message message = MQMsgBodyFactory.create(MQTopicName.TOPIC_ORDER, + OrderTopicTagEnum.banLiShopOrderRefund, msg); message.setStartDeliverTime(System.currentTimeMillis() + 1000 * 60 * 5L);// 寤舵椂24灏忔椂閫氱煡妫�娴嬪井淇¢��娆剧姸鎬� SendResult result = producer.send(message); if (result == null) { -- Gitblit v1.8.0