From dc124c0412d3b7559edb49843f553799f1f3124e Mon Sep 17 00:00:00 2001 From: "review512jwy@163.com" <“review512jwy@163.com”> Date: Tue, 21 Apr 2026 14:29:33 +0800 Subject: [PATCH] =?UTF-8?q?sql=E5=85=BC=E5=AE=B9=E5=9B=9E=E6=BB=9A?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mappers/ex/DeviceInfoMapperExt.xml | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/dongjian-dashboard-back-dao/src/main/resources/mappers/ex/DeviceInfoMapperExt.xml b/dongjian-dashboard-back-dao/src/main/resources/mappers/ex/DeviceInfoMapperExt.xml index 6766337..1268072 100644 --- a/dongjian-dashboard-back-dao/src/main/resources/mappers/ex/DeviceInfoMapperExt.xml +++ b/dongjian-dashboard-back-dao/src/main/resources/mappers/ex/DeviceInfoMapperExt.xml @@ -315,8 +315,8 @@ PARTITION BY device_id ORDER BY receive_ts DESC ) AS rn - FROM alert_history where alert_history.source_type = 1 - ) alert_history on alert_history.device_id = device_info.device_id AND alert_history.rn = 1 + FROM alert_history + ) alert_history on alert_history.device_id = device_info.device_id alert_history @@ -334,7 +334,6 @@ and device_info.flag = 0 and basic_monitoring_asset.flag != 1 and basic_space.flag != 1 and basic_floor.flag != 1 and basic_building.flag != 1 -# and alert_history.source_type = 1 @@ -376,8 +375,8 @@ PARTITION BY device_id ORDER BY receive_ts DESC ) AS rn - FROM alert_history where alert_history.source_type = 1 - ) alert_history on alert_history.device_id = device_info.device_id AND alert_history.rn = 1 + FROM alert_history + ) alert_history on alert_history.device_id = device_info.device_id alert_history @@ -397,7 +396,6 @@ and device_info.flag = 0 and basic_monitoring_asset.flag != 1 and basic_space.flag != 1 and basic_floor.flag != 1 and basic_building.flag != 1 and ddgr.device_group_id = #{deviceGroupId} -# and alert_history.source_type = 1