From 6401cfca37b19258959ce7a8d8ff558b50e40e19 Mon Sep 17 00:00:00 2001 From: jinpengyong <jpy123456> Date: Thu, 23 Dec 2021 14:34:59 +0800 Subject: [PATCH] 第三方数据复制请求过滤 --- screen-api/src/main/resources/mapper/AlarmInfoMapper.xml | 14 +++++++++++++- 1 files changed, 13 insertions(+), 1 deletions(-) diff --git a/screen-api/src/main/resources/mapper/AlarmInfoMapper.xml b/screen-api/src/main/resources/mapper/AlarmInfoMapper.xml index c2ed097..187b2e5 100644 --- a/screen-api/src/main/resources/mapper/AlarmInfoMapper.xml +++ b/screen-api/src/main/resources/mapper/AlarmInfoMapper.xml @@ -14,7 +14,7 @@ </resultMap> <select id="selectDataByCondition" resultType="java.util.Map"> - select ai.id alarmInfoId,ai.index,ai.alarm_type,ai.alarm_information,d.id deviceId,d.name deviceName,d.longitude,d.latitude + select ai.id alarmInfoId,ai.alarm_time,ai.index,ai.alarm_type,ai.alarm_information,d.id deviceId,d.name deviceName,d.longitude,d.latitude from alarm_info ai, device d where ai.device_id in <foreach collection="deviceIds" item="deviceId" index="index" open="(" close=")" separator=","> @@ -31,4 +31,16 @@ ORDER by ai.create_time DESC limit #{start},#{size} </select> + + <select id="selectNewestData" resultType="java.util.Map"> + select ai.id alarmInfoId,ai.alarm_time,ai.index,ai.alarm_type,ai.alarm_information,d.id deviceId,d.name deviceName,d.longitude,d.latitude + from alarm_info ai, device d + where ai.device_id in + <foreach collection="deviceIds" item="deviceId" index="index" open="(" close=")" separator=","> + #{deviceId} + </foreach> + and d.id = ai.device_id + ORDER by ai.create_time DESC + limit 0,#{size} + </select> </mapper> \ No newline at end of file -- Gitblit v1.8.0