Commit 5b0388ba authored by jiaorz's avatar jiaorz

添加积分消息队列接口

parent 05dfbed8
......@@ -22,10 +22,12 @@ public class MQServiceBiZ {
@Transactional(rollbackFor = Exception.class)
public ObjectRestResponse sendMessage(String exchange, String routKey, String json) {
log.info("发送消息到消息队列:exchange = {}, routingKey = {}, json = {}", exchange, routKey, json);
log.info("开始发送消息。。。");
Message message = MessageBuilder.withBody(json.getBytes())
.setContentType(MessageProperties.CONTENT_TYPE_JSON).setContentEncoding("utf-8")
.setMessageId(UUID.randomUUID() + "").build();
rabbitTemplate.convertAndSend(exchange, routKey, message);
log.info("发送成功。。。");
return ObjectRestResponse.succ();
}
}
......@@ -148,7 +148,7 @@ public class OrderPayBiz extends BaseBiz<OrderPayMapper,OrderPay> {
JSONObject jsonObject = new JSONObject();
jsonObject.put("userId", newValue.getUserId());
jsonObject.put("amount", newValue.getAmount());
jsonObject.put("channelId", newValue.getOrderNo());
jsonObject.put("channelId", newValue.getId());
if(newValue.getChannel() == 1) {//租车
jsonObject.put("integralRuleCode", "RENTRV");
} else if(newValue.getChannel() == 2) { //旅游
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment