区域管理-设备预览语句优化
This commit is contained in:
parent
1ca997fd74
commit
0af8cd78ba
|
|
@ -324,7 +324,7 @@
|
||||||
a.remarks,
|
a.remarks,
|
||||||
t.online_status as deviceStatus
|
t.online_status as deviceStatus
|
||||||
from nu_iot_device_preview a
|
from nu_iot_device_preview a
|
||||||
inner join nu_base_info c on a.nu_id = c.nu_id
|
left join nu_base_info c on a.nu_id = c.nu_id
|
||||||
inner join (
|
inner join (
|
||||||
select mac as sn,
|
select mac as sn,
|
||||||
( case device_status when '0' then '离线' when '1' then '在线' end ) as online_status
|
( case device_status when '0' then '离线' when '1' then '在线' end ) as online_status
|
||||||
|
|
@ -356,6 +356,9 @@
|
||||||
<if test="params.deviceType != null and params.deviceType != ''">
|
<if test="params.deviceType != null and params.deviceType != ''">
|
||||||
AND a.device_type = #{params.deviceType}
|
AND a.device_type = #{params.deviceType}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="params.deviceStatus != null and params.deviceStatus != ''">
|
||||||
|
AND t.online_status = #{params.deviceStatus}
|
||||||
|
</if>
|
||||||
order by a.dimension,a.device_type,a.device_model,a.sn
|
order by a.dimension,a.device_type,a.device_model,a.sn
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue