Showing
1 changed file
with
1 additions
and
1 deletions
... | ... | @@ -140,7 +140,7 @@ |
140 | 140 | LEFT JOIN attribute_kv c ON ifd.tb_device_id = c.entity_id::TEXT AND c.entity_type ='DEVICE' AND c.attribute_key='lastDisconnectTime' |
141 | 141 | LEFT JOIN attribute_kv e ON ifd.tb_device_id = e.entity_id::TEXT AND e.entity_type ='DEVICE' AND e.attribute_key='lastConnectTime' |
142 | 142 | LEFT JOIN device d ON d.id::TEXT = ifd.tb_device_id |
143 | - LEFT JOIN tk_device idg ON idg.id = ifd.gateway_id | |
143 | + LEFT JOIN tk_device idg ON idg.tb_device_id = ifd.gateway_id | |
144 | 144 | <where> |
145 | 145 | <if test="tenantId !=null and tenantId !=''"> |
146 | 146 | AND ifd.tenant_id = #{tenantId} | ... | ... |