Browse Source

更新mqtt匹配对应规则

tags/v1.0.2
xiaoying 1 year ago
parent
commit
1aead73afc
2 changed files with 3 additions and 2 deletions
  1. +2
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mqtt/MqttProviderConfig.java
  2. +1
    -1
      tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryVideoService.java

+ 2
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/mqtt/MqttProviderConfig.java View File

@@ -75,7 +75,8 @@ public class MqttProviderConfig {
client.connect(options);

//String topic = "$share/airmonitor/298dd766/environment/message";
String topic = "/v1/298dd766/environment/message";
String topic = "/v1/+/environment/message";
//String topic = "#";
client.subscribe(topic, 0);
} catch (MqttException e) {
e.printStackTrace();

+ 1
- 1
tuoheng-service/tuoheng-admin/src/main/java/com/tuoheng/admin/service/inspection/query/QueryVideoService.java View File

@@ -144,7 +144,7 @@ public class QueryVideoService {
log.info("获取的数据,dataObject={}", dataObject.toJSONString());
String records = dataObject.get("records").toString();
List<Airport> airportList = JSONObject.parseArray(records, Airport.class);
log.info("获取records中的数据为:airportList={}", airportList);
//log.info("获取records中的数据为:airportList={}", airportList);
if(CollectionUtil.isNotEmpty(airportList) || airportList.size() != 0){
Airport airport = airportList.get(0);
if(ObjectUtil.isNotNull(airport)){

Loading…
Cancel
Save