|
@@ -106,6 +106,11 @@ public class DeviceDetail {
|
|
this.tags = new ArrayList<>(map.values());
|
|
this.tags = new ArrayList<>(map.values());
|
|
this.tags.sort(Comparator.comparing(DeviceTagEntity::getCreateTime));
|
|
this.tags.sort(Comparator.comparing(DeviceTagEntity::getCreateTime));
|
|
|
|
|
|
|
|
+ if (StringUtils.hasText(id)) {
|
|
|
|
+ for (DeviceTagEntity tag : getTags()) {
|
|
|
|
+ tag.setId(DeviceTagEntity.createTagId(id, tag.getKey()));
|
|
|
|
+ }
|
|
|
|
+ }
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -135,6 +140,7 @@ public class DeviceDetail {
|
|
.ifPresent(this::setRegisterTime);
|
|
.ifPresent(this::setRegisterTime);
|
|
|
|
|
|
setCreateTime(device.getCreateTime());
|
|
setCreateTime(device.getCreateTime());
|
|
|
|
+ setOrgId(device.getOrgId());
|
|
|
|
|
|
if (!CollectionUtils.isEmpty(device.getConfiguration())) {
|
|
if (!CollectionUtils.isEmpty(device.getConfiguration())) {
|
|
setConfiguration(device.getConfiguration());
|
|
setConfiguration(device.getConfiguration());
|
|
@@ -143,6 +149,10 @@ public class DeviceDetail {
|
|
setMetadata(device.getDeriveMetadata());
|
|
setMetadata(device.getDeriveMetadata());
|
|
}
|
|
}
|
|
|
|
|
|
|
|
+ for (DeviceTagEntity tag : getTags()) {
|
|
|
|
+ tag.setId(DeviceTagEntity.createTagId(id, tag.getKey()));
|
|
|
|
+ }
|
|
|
|
+
|
|
return this;
|
|
return this;
|
|
}
|
|
}
|
|
|
|
|