Bladeren bron

增加设备描述

zhou-hao 4 jaren geleden
bovenliggende
commit
94c9b0e818

+ 4 - 0
jetlinks-manager/device-manager/src/main/java/org/jetlinks/community/device/response/DeviceDetail.java

@@ -116,6 +116,9 @@ public class DeviceDetail {
     @Schema(description = "标签信息")
     private List<DeviceTagEntity> tags = new ArrayList<>();
 
+    @Schema(description = "设备描述")
+    private String description;
+
     public DeviceDetail notActive() {
 
         state = DeviceState.notActive;
@@ -205,6 +208,7 @@ public class DeviceDetail {
         setState(device.getState());
         setOrgId(device.getOrgId());
         setParentId(device.getParentId());
+        setDescription(device.getDescribe());
         Optional.ofNullable(device.getRegistryTime())
                 .ifPresent(this::setRegisterTime);