Forráskód Böngészése

feat(device): 启用租户ID查询设备列表功能

- 在DeviceListQueryReq中重新启用tenantId字段以支持按租户查询设备
- 更新MqttSend中坐摔配置消息体的字段名称从fallSettingEnabled为enabled
-保持其他设备查询参数不变
- 确保mqtt消息构建逻辑的一致性修改
hxd 1 hete
szülő
commit
6a8f1e625f

+ 2 - 2
portal-service-common/src/main/java/com/hfln/portal/common/request/device/DeviceListQueryReq.java

@@ -9,8 +9,8 @@ import java.time.LocalDate;
 @Data
 public class DeviceListQueryReq extends PageVo {
 
-//    @Schema(description = "租户ID 为空则默认查全部设备,如果有对应值,则查询当前租户id下的所有设备")
-//    private Long tenantId;
+    @Schema(description = "租户ID 为空则默认查全部设备,如果有对应值,则查询当前租户id下的所有设备")
+    private Long tenantId;
 
     @Schema(description = "设备ID")
     private String clientId;

+ 2 - 2
portal-service-infrastructure/src/main/java/com/hfln/portal/infrastructure/mqtt/MqttSend.java

@@ -143,7 +143,7 @@ public class MqttSend {
 
         // 构建坐摔配置消息体
         Map<String, Object> target_on_ground_setting = new HashMap<>();
-        target_on_ground_setting.put("fallSettingEnabled",getFieldValue(params,"fallSettingEnabled"));
+        target_on_ground_setting.put("enabled",getFieldValue(params,"fallSettingEnabled"));
         target_on_ground_setting.put("lowHighSnrRatio",getFieldValue(params,"lowHighSnrRatio"));
         target_on_ground_setting.put("lowMidSnrRatio",getFieldValue(params,"lowMidSnrRatio"));
         target_on_ground_setting.put("lowSnrThr",getFieldValue(params,"lowSnrThr"));
@@ -205,7 +205,7 @@ public class MqttSend {
 
         // 构建坐摔配置消息体
         Map<String, Object> target_on_ground_setting = new HashMap<>();
-        target_on_ground_setting.put("fallSettingEnabled",getFieldValue(params,"fallSettingEnabled"));
+        target_on_ground_setting.put("enabled",getFieldValue(params,"fallSettingEnabled"));
         target_on_ground_setting.put("lowHighSnrRatio",getFieldValue(params,"lowHighSnrRatio"));
         target_on_ground_setting.put("lowMidSnrRatio",getFieldValue(params,"lowMidSnrRatio"));
         target_on_ground_setting.put("lowSnrThr",getFieldValue(params,"lowSnrThr"));