EmqxDeviceComponent 判断设备是否存在,从数据库读取。

V0.5.x
七步才子 2022-05-21 20:45:24 +08:00
parent 0d60b00235
commit 5683cf183e
1 changed files with 1 additions and 7 deletions

View File

@ -43,7 +43,7 @@ public class EmqxDeviceComponent extends AbstractDeviceComponent {
private EmqxConfig mqttConfig;
MqttClient client;
//组件mqtt clientId默认通过mqtt auth验证。
//组件mqtt clientId默认通过mqtt auth / acl验证。
private Set<String> compMqttClientIdList = new HashSet<>();
private TransparentConverter transparentConverter = new TransparentConverter();
@ -238,12 +238,6 @@ public class EmqxDeviceComponent extends AbstractDeviceComponent {
return true;
}
//作为子设备查找父设备
DeviceInfo parent = deviceRepository.findByDeviceId(child.getParentId());
if (parent != null) {
return true;
}
return false;
}