zhczyx@163.com 2 weeks ago
parent
commit
829569e0ca
  1. 8
      dongjian-dashboard-back-dao/src/main/resources/mappers/ex/DeviceInfoMapperExt.xml

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

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

Loading…
Cancel
Save