|
@@ -5,6 +5,7 @@ |
|
@@ -5,6 +5,7 @@ |
5
|
<resultMap type="org.thingsboard.server.common.data.yunteng.dto.SelectItemDTO" id="listInform">
|
5
|
<resultMap type="org.thingsboard.server.common.data.yunteng.dto.SelectItemDTO" id="listInform">
|
6
|
<result property="id" column="id"/>
|
6
|
<result property="id" column="id"/>
|
7
|
<result property="name" column="name"/>
|
7
|
<result property="name" column="name"/>
|
|
|
8
|
+ <result property="alias" column="alias"/>
|
8
|
<result property="deviceType" column="device_type" typeHandler="org.apache.ibatis.type.EnumTypeHandler"/>
|
9
|
<result property="deviceType" column="device_type" typeHandler="org.apache.ibatis.type.EnumTypeHandler"/>
|
9
|
</resultMap>
|
10
|
</resultMap>
|
10
|
<resultMap type="org.thingsboard.server.common.data.yunteng.dto.DeviceDTO" id="deviceMap">
|
11
|
<resultMap type="org.thingsboard.server.common.data.yunteng.dto.DeviceDTO" id="deviceMap">
|
|
@@ -336,7 +337,7 @@ |
|
@@ -336,7 +337,7 @@ |
336
|
|
337
|
|
337
|
<select id="masterDevices" resultMap="listInform">
|
338
|
<select id="masterDevices" resultMap="listInform">
|
338
|
SELECT
|
339
|
SELECT
|
339
|
- base.tb_device_id as id,base.name,base.device_type,base.device_profile_id
|
340
|
+ base.tb_device_id as id,base.name,base.alias,base.device_type,base.device_profile_id
|
340
|
FROM tk_device base
|
341
|
FROM tk_device base
|
341
|
LEFT JOIN device tde ON tde.ID :: TEXT = base.tb_device_id
|
342
|
LEFT JOIN device tde ON tde.ID :: TEXT = base.tb_device_id
|
342
|
<where>
|
343
|
<where>
|
|
@@ -361,7 +362,7 @@ |
|
@@ -361,7 +362,7 @@ |
361
|
|
362
|
|
362
|
<select id="slaveDevices" resultMap="listInform">
|
363
|
<select id="slaveDevices" resultMap="listInform">
|
363
|
SELECT
|
364
|
SELECT
|
364
|
- ide.tb_device_id as id,ide.name,ide.device_type,ide.device_profile_id
|
365
|
+ ide.tb_device_id as id,ide.name,base.alias,ide.device_type,ide.device_profile_id
|
365
|
FROM (select * from relation where relation_type_group = 'COMMON' AND relation_type = 'Created' AND from_type = 'DEVICE' AND to_type = 'DEVICE'
|
366
|
FROM (select * from relation where relation_type_group = 'COMMON' AND relation_type = 'Created' AND from_type = 'DEVICE' AND to_type = 'DEVICE'
|
366
|
<if test="masterId !=null and masterId !=''">
|
367
|
<if test="masterId !=null and masterId !=''">
|
367
|
AND from_id :: TEXT = #{masterId}
|
368
|
AND from_id :: TEXT = #{masterId}
|