修改代码

This commit is contained in:
孙小云 2026-01-17 16:08:58 +08:00
parent a99053e108
commit 040359177e
3 changed files with 3 additions and 1 deletions

View File

@ -80,6 +80,7 @@ public interface IThingsBoardDomain {
* @param deviceId 设备ID * @param deviceId 设备ID
* @return 网关设备ID如果设备不属于任何网关则返回 null * @return 网关设备ID如果设备不属于任何网关则返回 null
*/ */
@Deprecated
String getDeviceGatewayId(String deviceId); String getDeviceGatewayId(String deviceId);
/** /**

View File

@ -212,6 +212,7 @@ public class ThingsBoardDomainImpl implements IThingsBoardDomain {
} }
@Override @Override
@Deprecated
public String getDeviceGatewayId(String deviceId) { public String getDeviceGatewayId(String deviceId) {
try { try {
DeviceId id = new DeviceId(UUID.fromString(deviceId)); DeviceId id = new DeviceId(UUID.fromString(deviceId));

View File

@ -227,7 +227,7 @@ public class SynService {
try { try {
// 获取子设备属性 // 获取子设备属性
AttributeMap attributes = iThingsBoardDomain.getDeviceAttributes(childDeviceId); AttributeMap attributes = iThingsBoardDomain.getPredefinedDeviceAttributes(childDeviceId);
// 判断设备类型 // 判断设备类型
DeviceType deviceType = determineDeviceType(childDeviceInfo, attributes); DeviceType deviceType = determineDeviceType(childDeviceInfo, attributes);