Compare commits

...

2 Commits

  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 PARTITION BY device_id
ORDER BY receive_ts DESC ORDER BY receive_ts DESC
) AS rn ) 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 ) 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 and alert_history.source_type = 1 left join device_info on alert_history.device_id = device_info.device_id
</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 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 ) 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 and alert_history.source_type = 1 left join device_info on alert_history.device_id = device_info.device_id
</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