|
|
@@ -10,7 +10,8 @@
|
|
|
FROM
|
|
|
iot_alarm_data a
|
|
|
LEFT JOIN sys_org b ON a.org_id = b.id
|
|
|
- where 1=1
|
|
|
+ LEFT JOIN iot_device_info d ON a.device_id = d.id
|
|
|
+ where 1=1 and d.deleted = 0
|
|
|
<if test="param.deviceName != null and param.deviceName != ''">
|
|
|
and a.device_name like concat('%',#{param.deviceName},'%')
|
|
|
</if>
|
|
|
@@ -71,7 +72,8 @@
|
|
|
FROM
|
|
|
iot_alarm_data a
|
|
|
LEFT JOIN sys_org b ON a.org_id = b.id
|
|
|
- where 1=1
|
|
|
+ LEFT JOIN iot_device_info d ON a.device_id = d.id
|
|
|
+ where 1=1 and d.deleted = 0
|
|
|
<if test="param.deviceName != null and param.deviceName != ''">
|
|
|
and a.device_name like concat('%',#{param.deviceName},'%')
|
|
|
</if>
|