fix: 微信小程序接口对接修改,联调测试问题修复。

This commit is contained in:
tianyongbao
2026-01-15 11:35:13 +08:00
parent 54bcaf3c2c
commit 7efbad95aa
23 changed files with 1797 additions and 179 deletions

View File

@@ -47,13 +47,6 @@ public class AliyunIotProperties {
*/
private String categoryKey;
/**
* 设备类型到产品Key的映射
* 1: 水质检测仪
* 2: 控制一体机
*/
private DeviceTypeMapping deviceType = new DeviceTypeMapping();
/**
* MQTT 配置(可选,用于设备直连)
*/
@@ -165,47 +158,4 @@ public class AliyunIotProperties {
private Integer reconnectDelay = 30000;
}
/**
* 设备类型映射配置
*/
@Data
public static class DeviceTypeMapping {
/**
* 水质检测仪 ProductKey
*/
private String waterQualityMonitor;
/**
* 控制一体机 ProductKey
*/
private String controlIntegrated;
/**
* 控制器 ProductKey (别名,指向 controlIntegrated)
* @return ProductKey
*/
public String getController() {
return controlIntegrated;
}
/**
* 根据设备类型获取 ProductKey
* @param deviceType 1-水质检测仪, 2-控制一体机
* @return ProductKey
*/
public String getProductKeyByType(Integer deviceType) {
if (deviceType == null) {
return null;
}
switch (deviceType) {
case 1:
return waterQualityMonitor;
case 2:
return controlIntegrated;
default:
return null;
}
}
}
}