Commit 566f5a12b718beb1c94b0f18234e7351623ad95f

Authored by YunaiV
1 parent 9240e16c

feat(iot): add j2mod dependency and refactor connection info method

yudao-dependencies/pom.xml
... ... @@ -70,6 +70,7 @@
70 70 <vertx.version>4.5.22</vertx.version>
71 71 <okhttp.version>4.12.0</okhttp.version>
72 72 <californium.version>3.12.0</californium.version>
  73 + <j2mod.version>3.2.1</j2mod.version>
73 74 <!-- 三方云服务相关 -->
74 75 <awssdk.version>2.40.15</awssdk.version>
75 76 <justauth.version>1.16.7</justauth.version>
... ... @@ -601,6 +602,13 @@
601 602 <version>${californium.version}</version>
602 603 </dependency>
603 604  
  605 + <!-- Modbus 相关 -->
  606 + <dependency>
  607 + <groupId>com.ghgande</groupId>
  608 + <artifactId>j2mod</artifactId>
  609 + <version>${j2mod.version}</version>
  610 + </dependency>
  611 +
604 612 <!-- 三方云服务相关 -->
605 613 <dependency>
606 614 <groupId>software.amazon.awssdk</groupId>
... ...
yudao-module-iot/yudao-module-iot-gateway/pom.xml
... ... @@ -52,7 +52,6 @@
52 52 <dependency>
53 53 <groupId>com.ghgande</groupId>
54 54 <artifactId>j2mod</artifactId>
55   - <version>3.2.1</version>
56 55 </dependency>
57 56  
58 57 <!-- CoAP 相关 - Eclipse Californium -->
... ...
yudao-module-iot/yudao-module-iot-gateway/src/main/java/cn/iocoder/yudao/module/iot/gateway/protocol/mqtt/manager/IotMqttConnectionManager.java
... ... @@ -124,7 +124,7 @@ public class IotMqttConnectionManager {
124 124 * @param deviceId 设备 ID
125 125 * @return 连接信息
126 126 */
127   - public IotMqttConnectionManager.ConnectionInfo getConnectionInfoByDeviceId(Long deviceId) {
  127 + public ConnectionInfo getConnectionInfoByDeviceId(Long deviceId) {
128 128 // 通过设备 ID 获取连接端点
129 129 MqttEndpoint endpoint = getDeviceEndpoint(deviceId);
130 130 if (endpoint == null) {
... ...