From 67d06a785d5fc4524639ace27651c01ff05a4b58 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期四, 29 五月 2025 22:31:33 +0800
Subject: [PATCH] 修改bug

---
 ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/rocket/produce/EnhanceProduce.java |   93 ++++++++++++++++++++++++++++++++++++++++++++++
 1 files changed, 93 insertions(+), 0 deletions(-)

diff --git a/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/rocket/produce/EnhanceProduce.java b/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/rocket/produce/EnhanceProduce.java
index 2cfd639..43f8fdf 100644
--- a/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/rocket/produce/EnhanceProduce.java
+++ b/ruoyi-service/ruoyi-integration/src/main/java/com/ruoyi/integration/rocket/produce/EnhanceProduce.java
@@ -2,6 +2,10 @@
 
 import com.alibaba.fastjson.JSON;
 import com.alibaba.fastjson.JSONObject;
+import com.ruoyi.integration.api.model.ErrorMessage;
+import com.ruoyi.integration.api.model.ParameterSetting;
+import com.ruoyi.integration.api.model.QrCodeDeliveryReply;
+import com.ruoyi.integration.api.model.SecurityDetection;
 import com.ruoyi.integration.iotda.constant.SendTagConstant;
 import com.ruoyi.integration.rocket.model.*;
 import com.ruoyi.integration.rocket.util.RocketMQEnhanceTemplate;
@@ -22,6 +26,7 @@
     private RocketMQEnhanceTemplate rocketMQEnhanceTemplate;
 
     private static final String TOPIC = "charge_";
+    private static final String TOPIC_JIANGUAN = "jianguan_";
 
     /**
      * 充电桩登录认证
@@ -53,6 +58,16 @@
         // 设置消息来源,便于查询
         message.setSource(SendTagConstant.END_CHARGE);
         return rocketMQEnhanceTemplate.send(TOPIC+SendTagConstant.END_CHARGE, SendTagConstant.END_CHARGE, message);
+    }
+    /**
+     * 错误报文
+     */
+    public SendResult errorMessageMessage(ErrorMessageMessage message) {
+        // 设置业务key
+        message.setKey(UUID.randomUUID().toString());
+        // 设置消息来源,便于查询
+        message.setSource(SendTagConstant.ERROR_MESSAGE);
+        return rocketMQEnhanceTemplate.send(TOPIC+SendTagConstant.ERROR_MESSAGE, SendTagConstant.ERROR_MESSAGE, message);
     }
 
     /**
@@ -97,6 +112,16 @@
         // 设置消息来源,便于查询
         message.setSource(SendTagConstant.CHARGING_HANDSHAKE);
         return rocketMQEnhanceTemplate.send(TOPIC+SendTagConstant.CHARGING_HANDSHAKE, SendTagConstant.CHARGING_HANDSHAKE, message);
+    }
+    /**
+     * 参数设置
+     */
+    public SendResult parameterSettingMessage(ParameterSettingMessage message) {
+        // 设置业务key
+        message.setKey(UUID.randomUUID().toString());
+        // 设置消息来源,便于查询
+        message.setSource(SendTagConstant.PARAMETER_SETTING);
+        return rocketMQEnhanceTemplate.send(TOPIC+SendTagConstant.PARAMETER_SETTING, SendTagConstant.PARAMETER_SETTING, message);
     }
 
     /**
@@ -296,4 +321,72 @@
         message.setSource(SendTagConstant.PLATFORM_REMOTE_UPDATE_REPLY);
         return rocketMQEnhanceTemplate.send(TOPIC+SendTagConstant.PLATFORM_REMOTE_UPDATE_REPLY, SendTagConstant.PLATFORM_REMOTE_UPDATE_REPLY, message);
     }
+
+    /**
+     * 二维码下发应答
+     */
+    public SendResult qrCodeDeliveryReplyMessage(QrCodeDeliveryReplyMessage message) {
+        // 设置业务key
+        message.setKey(UUID.randomUUID().toString());
+        // 设置消息来源,便于查询
+        message.setSource(SendTagConstant.QR_CODE_DELIVERY_REPLY);
+        return rocketMQEnhanceTemplate.send(TOPIC+SendTagConstant.QR_CODE_DELIVERY_REPLY, SendTagConstant.QR_CODE_DELIVERY_REPLY, message);
+    }
+
+    /**
+     * 安全监测
+     */
+    public SendResult securityDetectionMessage(SecurityDetectionMessage message) {
+        // 设置业务key
+        message.setKey(UUID.randomUUID().toString());
+        // 设置消息来源,便于查询
+        message.setSource(SendTagConstant.SECURITY_DETECTION);
+        return rocketMQEnhanceTemplate.send(TOPIC+SendTagConstant.SECURITY_DETECTION, SendTagConstant.SECURITY_DETECTION, message);
+    }
+
+    /**
+     * 充电桩登录认证
+     */
+    public SendResult chargingMessage(ChargingMessage message) {
+        // 设置业务key
+        message.setKey(UUID.randomUUID().toString());
+        // 设置消息来源,便于查询
+        message.setSource(SendTagConstant.CHARGING_MESSAGE);
+
+        return rocketMQEnhanceTemplate.send(TOPIC+SendTagConstant.CHARGING_MESSAGE, SendTagConstant.CHARGING_MESSAGE, message);
+    }
+    /**
+     * 监管平台推送充电设备接口状态
+     */
+    public SendResult gunStatusMessage(ChargingMessage message) {
+        // 设置业务key
+        message.setKey(UUID.randomUUID().toString());
+        // 设置消息来源,便于查询
+        message.setSource(SendTagConstant.GUN_STATUS);
+
+        return rocketMQEnhanceTemplate.send(TOPIC_JIANGUAN+SendTagConstant.GUN_STATUS, SendTagConstant.GUN_STATUS, message);
+    }
+    /**
+     * 监管平台推送充电订单信息
+     */
+    public SendResult orderInfoMessage(ChargingMessage message) {
+        // 设置业务key
+        message.setKey(UUID.randomUUID().toString());
+        // 设置消息来源,便于查询
+        message.setSource(SendTagConstant.ORDER_INFO);
+
+        return rocketMQEnhanceTemplate.send(TOPIC_JIANGUAN+SendTagConstant.ORDER_INFO, SendTagConstant.ORDER_INFO, message);
+    }
+    /**
+     * 监管平台推送充电订单状态
+     */
+    public SendResult orderStatusMessage(ChargingMessage message) {
+        // 设置业务key
+        message.setKey(UUID.randomUUID().toString());
+        // 设置消息来源,便于查询
+        message.setSource(SendTagConstant.ORDER_STATUS);
+
+        return rocketMQEnhanceTemplate.send(TOPIC_JIANGUAN+SendTagConstant.ORDER_STATUS, SendTagConstant.ORDER_STATUS, message);
+    }
+
 }
\ No newline at end of file

--
Gitblit v1.7.1