Commit 2909b4aedc09a0529264ea41c508dcedd7b0767e

Authored by 云中非
1 parent 75ea7bfc

fix: 设备相关

1.扩展设备信息
@@ -73,4 +73,5 @@ public class DeviceDTO extends TenantDTO { @@ -73,4 +73,5 @@ public class DeviceDTO extends TenantDTO {
73 /** 告警状态:0:正常 1:告警 */ 73 /** 告警状态:0:正常 1:告警 */
74 @ApiModelProperty(value="告警状态:0正常,1告警") 74 @ApiModelProperty(value="告警状态:0正常,1告警")
75 private Integer alarmStatus; 75 private Integer alarmStatus;
  76 + private String description;
76 } 77 }
@@ -38,4 +38,5 @@ public class YtDevice extends TenantBaseEntity { @@ -38,4 +38,5 @@ public class YtDevice extends TenantBaseEntity {
38 private String organizationId; 38 private String organizationId;
39 /** 告警状态:0:正常 1:告警 */ 39 /** 告警状态:0:正常 1:告警 */
40 private Integer alarmStatus; 40 private Integer alarmStatus;
  41 + private String description;
41 } 42 }
@@ -24,6 +24,7 @@ @@ -24,6 +24,7 @@
24 <result property="organizationId" column="organization_id"/> 24 <result property="organizationId" column="organization_id"/>
25 <association property="deviceProfile" javaType="org.thingsboard.server.common.data.yunteng.dto.DeviceProfileDTO"> 25 <association property="deviceProfile" javaType="org.thingsboard.server.common.data.yunteng.dto.DeviceProfileDTO">
26 <result property="name" column="profile_name"/> 26 <result property="name" column="profile_name"/>
  27 + <result property="transportType" column="transport_type"/>
27 </association> 28 </association>
28 <association property="organizationDTO" javaType="org.thingsboard.server.common.data.yunteng.dto.OrganizationDTO"> 29 <association property="organizationDTO" javaType="org.thingsboard.server.common.data.yunteng.dto.OrganizationDTO">
29 <result property="name" column="organization_name"/> 30 <result property="name" column="organization_name"/>
@@ -33,10 +34,12 @@ @@ -33,10 +34,12 @@
33 ifd.id,ifd.name,ifd.device_info,ifd.profile_id,ifd.active_time,ifd.device_token,ifd.tenant_id 34 ifd.id,ifd.name,ifd.device_info,ifd.profile_id,ifd.active_time,ifd.device_token,ifd.tenant_id
34 ,ifd.tb_device_id,ifd.label,ifd.last_connect_time,ifd.device_type,ifd.device_state,ifd.create_time,ifd.update_time,ifd.creator, 35 ,ifd.tb_device_id,ifd.label,ifd.last_connect_time,ifd.device_type,ifd.device_state,ifd.create_time,ifd.update_time,ifd.creator,
35 ifd.updater,ifd.organization_id,ifd,alarm_status 36 ifd.updater,ifd.organization_id,ifd,alarm_status
  37 + ,ifdp.name AS profile_name,ifdp.transport_type
  38 + ,io.name AS organization_name
36 </sql> 39 </sql>
37 <select id="getDevicePage" resultMap="deviceMap"> 40 <select id="getDevicePage" resultMap="deviceMap">
38 SELECT 41 SELECT
39 - <include refid="columns"/>,ifdp.name AS profile_name,io.name AS organization_name 42 + <include refid="columns"/>
40 FROM iotfs_device ifd 43 FROM iotfs_device ifd
41 LEFT JOIN device_profile ifdp ON ifd.profile_id = CAST (ifdp.id AS VARCHAR) 44 LEFT JOIN device_profile ifdp ON ifd.profile_id = CAST (ifdp.id AS VARCHAR)
42 LEFT JOIN iotfs_organization io ON io.id = ifd.organization_id 45 LEFT JOIN iotfs_organization io ON io.id = ifd.organization_id