From 8546b3d285af4235a0ef615a0c6e89486ae2c806 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期四, 17 十月 2024 21:01:37 +0800
Subject: [PATCH] 达梦不支持value改为values

---
 src/main/java/com/ycl/jxkg/rabbitmq/product/Producer.java |   11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diff --git a/src/main/java/com/ycl/jxkg/rabbitmq/product/Producer.java b/src/main/java/com/ycl/jxkg/rabbitmq/product/Producer.java
index eb1420d..aeabc0c 100644
--- a/src/main/java/com/ycl/jxkg/rabbitmq/product/Producer.java
+++ b/src/main/java/com/ycl/jxkg/rabbitmq/product/Producer.java
@@ -34,11 +34,16 @@
         Message message = MessageBuilder.withBody(jsonMsg.getBytes()).andProperties(messageProperties).build();
         // 璁剧疆娑堟伅鐨勫叧鑱旀暟鎹紝浠ヤ究鍙戦�佺‘璁ゅ洖璋冦�佹湭璺敱鎴愬姛娑堟伅鐨勫鐞�
         MyCorrelationData msgCorrelationData = new MyCorrelationData(examId + "", RabbitMqMsgTypeEnum.EXAM);
-        rabbitTemplate.convertAndSend("examExchange", "exam", message, msgCorrelationData);
+        rabbitTemplate.convertAndSend("jxkgExchange", "exam", message, msgCorrelationData);
     }
 
-    public void meetMsg(Integer examId, String jsonMsg, Long delayTime) {
-        rabbitTemplate.convertAndSend("examExchange","meet", "浣犲ソ锛孯abbitMQ");
+    public void meetMsg(Integer meetId, String jsonMsg, Long delayTime) {
+        MessageProperties messageProperties = new MessageProperties();
+        messageProperties.setExpiration(delayTime + "");
+        Message message = MessageBuilder.withBody(jsonMsg.getBytes()).andProperties(messageProperties).build();
+        // 璁剧疆娑堟伅鐨勫叧鑱旀暟鎹紝浠ヤ究鍙戦�佺‘璁ゅ洖璋冦�佹湭璺敱鎴愬姛娑堟伅鐨勫鐞�
+        MyCorrelationData msgCorrelationData = new MyCorrelationData(meetId + "", RabbitMqMsgTypeEnum.MEET);
+        rabbitTemplate.convertAndSend("jxkgExchange", "meet", message, msgCorrelationData);
     }
 
 }

--
Gitblit v1.8.0