From 44f2a0a32c096bdb05d4cc0ac162cdc1eb14c3ed Mon Sep 17 00:00:00 2001
From: Administrator <1144154118@qq.com>
Date: 星期四, 10 八月 2023 13:14:29 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
ard-work/src/main/java/com/ruoyi/utils/mqtt/MqttConsumerCallback.java | 10 ++++++++--
1 files changed, 8 insertions(+), 2 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/utils/mqtt/MqttConsumerCallback.java b/ard-work/src/main/java/com/ruoyi/utils/mqtt/MqttConsumerCallback.java
index d6e12c1..d968436 100644
--- a/ard-work/src/main/java/com/ruoyi/utils/mqtt/MqttConsumerCallback.java
+++ b/ard-work/src/main/java/com/ruoyi/utils/mqtt/MqttConsumerCallback.java
@@ -2,6 +2,7 @@
import com.ruoyi.alarm.global.service.impl.GlobalAlarmServiceImpl;
import com.ruoyi.common.utils.spring.SpringUtils;
+import com.ruoyi.storage.minio.service.IStorageMinioEventService;
import lombok.extern.slf4j.Slf4j;
import org.eclipse.paho.client.mqttv3.*;
@@ -68,12 +69,17 @@
public void messageArrived(String topic, MqttMessage message) {
try {
// subscribe鍚庡緱鍒扮殑娑堟伅浼氭墽琛屽埌杩欓噷闈�
- log.info("鎺ユ敹娑堟伅 銆愪富棰樸��:" + topic + " 銆愬唴瀹广��:" + new String(message.getPayload()));
+ log.debug("鎺ユ敹娑堟伅 銆愪富棰樸��:" + topic + " 銆愬唴瀹广��:" + new String(message.getPayload()));
//杩涜涓氬姟澶勭悊(鎺ユ敹鎶ヨ鏁版嵁)
GlobalAlarmServiceImpl globalAlarmService = SpringUtils.getBean(GlobalAlarmServiceImpl.class);
globalAlarmService.receiveAlarm(topic, new String(message.getPayload(), StandardCharsets.UTF_8));
+ if (topic.equals("minioEvent"))
+ {
+ IStorageMinioEventService storageMinioEventService = SpringUtils.getBean(IStorageMinioEventService.class);
+ storageMinioEventService.parseStorageMinioEvent(new String(message.getPayload(), StandardCharsets.UTF_8));
+ }
} catch (Exception e) {
- log.info("澶勭悊mqtt娑堟伅寮傚父:" + e);
+ log.debug("澶勭悊mqtt娑堟伅寮傚父:" + e);
}
}
--
Gitblit v1.9.3