From 90afc87117885a6a7aa03110b37c1ebd280c9466 Mon Sep 17 00:00:00 2001
From: aijinhui <aijinhui>
Date: 星期日, 14 一月 2024 12:24:10 +0800
Subject: [PATCH] 锁订阅
---
ard-work/src/main/java/com/ruoyi/utils/qymqtt/AutoMqtt.java | 8 +++++---
ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java | 2 +-
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java b/ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java
index 6b28819..c3486d2 100644
--- a/ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java
+++ b/ard-work/src/main/java/com/ruoyi/sy/gps31/PushClientImplPosition.java
@@ -108,7 +108,7 @@
//鏃犻攣
rtuType = false;
}
- log.debug("瀹氫綅鏁版嵁锛氳溅杈哻arId:"+carId+"缁忓害lng:"+lng+"绾害lat:"+lat);
+// log.debug("瀹氫綅鏁版嵁锛氳溅杈哻arId:"+carId+"缁忓害lng:"+lng+"绾害lat:"+lat);
//瀹氫箟2缁寸┖闂�
Point2D.Double point = new Point2D.Double(Double.parseDouble(lng), Double.parseDouble(lat));
List<Point2D.Double> pts = new ArrayList<Point2D.Double>();
diff --git a/ard-work/src/main/java/com/ruoyi/utils/qymqtt/AutoMqtt.java b/ard-work/src/main/java/com/ruoyi/utils/qymqtt/AutoMqtt.java
index 10c9c6d..ab3a4f8 100644
--- a/ard-work/src/main/java/com/ruoyi/utils/qymqtt/AutoMqtt.java
+++ b/ard-work/src/main/java/com/ruoyi/utils/qymqtt/AutoMqtt.java
@@ -14,12 +14,12 @@
@Slf4j(topic = "mqttCar")
@Component
-public class AutoMqtt {
+public class AutoMqtt {
@Autowired
private ArdSyCarRtuService ardSyCarRtuService;
-// @PostConstruct
+ @PostConstruct
public void init() {
// ArdSyCarRtuService carRtuService = SpringUtils.getBean(ArdSyCarRtuService.class);
// //鑾峰彇鐢电閿佸湴鍧�
@@ -36,10 +36,12 @@
EmqClient emqClient = new EmqClient(carId+"mqttSubscribe"+UUID.randomUUID());
emqClient.connect();
emqClient.subscribe(subscribe, QosEnum.QoS2);
- log.debug("璁㈤槄涓婚锛�"+subscribe);
+ log.info("璁㈤槄涓婚锛�"+subscribe);
}catch (Exception e) {
e.printStackTrace();
}
}
}
+
+
}
--
Gitblit v1.9.3