Commit 566f5a12b718beb1c94b0f18234e7351623ad95f
1 parent
9240e16c
feat(iot): add j2mod dependency and refactor connection info method
Showing
3 changed files
with
9 additions
and
2 deletions
yudao-dependencies/pom.xml
| @@ -70,6 +70,7 @@ | @@ -70,6 +70,7 @@ | ||
| 70 | <vertx.version>4.5.22</vertx.version> | 70 | <vertx.version>4.5.22</vertx.version> |
| 71 | <okhttp.version>4.12.0</okhttp.version> | 71 | <okhttp.version>4.12.0</okhttp.version> |
| 72 | <californium.version>3.12.0</californium.version> | 72 | <californium.version>3.12.0</californium.version> |
| 73 | + <j2mod.version>3.2.1</j2mod.version> | ||
| 73 | <!-- 三方云服务相关 --> | 74 | <!-- 三方云服务相关 --> |
| 74 | <awssdk.version>2.40.15</awssdk.version> | 75 | <awssdk.version>2.40.15</awssdk.version> |
| 75 | <justauth.version>1.16.7</justauth.version> | 76 | <justauth.version>1.16.7</justauth.version> |
| @@ -601,6 +602,13 @@ | @@ -601,6 +602,13 @@ | ||
| 601 | <version>${californium.version}</version> | 602 | <version>${californium.version}</version> |
| 602 | </dependency> | 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 | <dependency> | 613 | <dependency> |
| 606 | <groupId>software.amazon.awssdk</groupId> | 614 | <groupId>software.amazon.awssdk</groupId> |
yudao-module-iot/yudao-module-iot-gateway/pom.xml
| @@ -52,7 +52,6 @@ | @@ -52,7 +52,6 @@ | ||
| 52 | <dependency> | 52 | <dependency> |
| 53 | <groupId>com.ghgande</groupId> | 53 | <groupId>com.ghgande</groupId> |
| 54 | <artifactId>j2mod</artifactId> | 54 | <artifactId>j2mod</artifactId> |
| 55 | - <version>3.2.1</version> | ||
| 56 | </dependency> | 55 | </dependency> |
| 57 | 56 | ||
| 58 | <!-- CoAP 相关 - Eclipse Californium --> | 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,7 +124,7 @@ public class IotMqttConnectionManager { | ||
| 124 | * @param deviceId 设备 ID | 124 | * @param deviceId 设备 ID |
| 125 | * @return 连接信息 | 125 | * @return 连接信息 |
| 126 | */ | 126 | */ |
| 127 | - public IotMqttConnectionManager.ConnectionInfo getConnectionInfoByDeviceId(Long deviceId) { | 127 | + public ConnectionInfo getConnectionInfoByDeviceId(Long deviceId) { |
| 128 | // 通过设备 ID 获取连接端点 | 128 | // 通过设备 ID 获取连接端点 |
| 129 | MqttEndpoint endpoint = getDeviceEndpoint(deviceId); | 129 | MqttEndpoint endpoint = getDeviceEndpoint(deviceId); |
| 130 | if (endpoint == null) { | 130 | if (endpoint == null) { |