|
@@ -7,7 +7,7 @@
|
|
id, device_code, type, status, gateway_id
|
|
id, device_code, type, status, gateway_id
|
|
</sql>
|
|
</sql>
|
|
<select id="listByLocationId" resultType="com.huimv.env.admin.entity.vo.TerminalPageResult">
|
|
<select id="listByLocationId" resultType="com.huimv.env.admin.entity.vo.TerminalPageResult">
|
|
- SELECT t.device_code AS 'deviceCode',t.device_name AS 'deviceName',t.type AS 'type',t.status AS 'status',
|
|
|
|
|
|
+ SELECT t.id as 'id',t.device_code AS 'deviceCode',t.device_name AS 'deviceName',t.type AS 'type',t.status AS 'status',
|
|
g.device_code AS 'gatewayCode',g.device_name AS 'gatewayName',g.type AS 'gatewayType',g.status AS 'gatewayStatus'
|
|
g.device_code AS 'gatewayCode',g.device_name AS 'gatewayName',g.type AS 'gatewayType',g.status AS 'gatewayStatus'
|
|
FROM
|
|
FROM
|
|
`base_pigpen` b LEFT JOIN `gateway` g ON b.id = g.location_id LEFT JOIN `terminal` t ON g.id = t.gateway_id
|
|
`base_pigpen` b LEFT JOIN `gateway` g ON b.id = g.location_id LEFT JOIN `terminal` t ON g.id = t.gateway_id
|