Showing
2 changed files
with
4 additions
and
1 deletions
... | ... | @@ -25,6 +25,7 @@ |
25 | 25 | <result property="updater" column="updater"/> |
26 | 26 | <result property="description" column="description"/> |
27 | 27 | <result property="customerId" column="customer_id"/> |
28 | + <result property="customerName" column="cusotomer_name"/> | |
28 | 29 | <result property="organizationId" column="organization_id"/> |
29 | 30 | <result property="gatewayId" column="gateway_id"/> |
30 | 31 | <result property="gatewayName" column="gateway_name"/> |
... | ... | @@ -72,7 +73,7 @@ |
72 | 73 | </sql> |
73 | 74 | <select id="getDevicePage" resultMap="deviceMap"> |
74 | 75 | SELECT |
75 | - <include refid="pageColumns"/>,d.customer_id::TEXT AS customer_id | |
76 | + <include refid="pageColumns"/>,d.customer_id::TEXT AS customer_id,cus.title AS cusotomer_name | |
76 | 77 | FROM iotfs_device ifd |
77 | 78 | LEFT JOIN device_profile ifdp ON ifd.profile_id = ifdp.id::TEXT |
78 | 79 | LEFT JOIN iotfs_organization io ON io.id = ifd.organization_id |
... | ... | @@ -83,6 +84,7 @@ |
83 | 84 | LEFT JOIN attribute_kv c ON ifd.tb_device_id = c.entity_id::TEXT AND c.entity_type ='DEVICE' AND |
84 | 85 | c.attribute_key='inactivityAlarmTime' |
85 | 86 | LEFT JOIN device d ON d.id::TEXT = ifd.tb_device_id |
87 | + LEFT JOIN customer cus ON cus.id = d.customer_id | |
86 | 88 | <where> |
87 | 89 | <if test="queryMap.tenantId !=null and queryMap.tenantId !=''"> |
88 | 90 | AND ifd.tenant_id = #{queryMap.tenantId} | ... | ... |