Browse Source

告警相关查询,F10兼容

bug
review512jwy@163.com 1 month ago
parent
commit
420c1a7d1f
  1. 12
      dongjian-dashboard-back-dao/src/main/resources/mappers/ex/DeviceInfoMapperExt.xml

12
dongjian-dashboard-back-dao/src/main/resources/mappers/ex/DeviceInfoMapperExt.xml

@ -315,12 +315,12 @@
PARTITION BY device_id PARTITION BY device_id
ORDER BY receive_ts DESC ORDER BY receive_ts DESC
) AS rn ) AS rn
FROM alert_history FROM alert_history where alert_history.source_type = 1
) alert_history on alert_history.device_id = device_info.device_id ) alert_history on alert_history.device_id = device_info.device_id AND alert_history.rn = 1
</when> </when>
<otherwise> <otherwise>
alert_history alert_history
left join device_info on alert_history.device_id = device_info.device_id left join device_info on alert_history.device_id = device_info.device_id and alert_history.source_type = 1
</otherwise> </otherwise>
</choose> </choose>
left join basic_monitoring_asset on device_info.asset_id = basic_monitoring_asset.equipment_id left join basic_monitoring_asset on device_info.asset_id = basic_monitoring_asset.equipment_id
@ -375,12 +375,12 @@
PARTITION BY device_id PARTITION BY device_id
ORDER BY receive_ts DESC ORDER BY receive_ts DESC
) AS rn ) AS rn
FROM alert_history FROM alert_history where alert_history.source_type = 1
) alert_history on alert_history.device_id = device_info.device_id ) alert_history on alert_history.device_id = device_info.device_id AND alert_history.rn = 1
</when> </when>
<otherwise> <otherwise>
alert_history alert_history
left join device_info on alert_history.device_id = device_info.device_id left join device_info on alert_history.device_id = device_info.device_id and alert_history.source_type = 1
</otherwise> </otherwise>
</choose> </choose>
left join basic_monitoring_asset on device_info.asset_id = basic_monitoring_asset.equipment_id left join basic_monitoring_asset on device_info.asset_id = basic_monitoring_asset.equipment_id

Loading…
Cancel
Save