From 4adb7e037599e4cbc3049a9a1ba965cfc7b05c38 Mon Sep 17 00:00:00 2001 From: jinpengyong <jpy123456> Date: Mon, 20 Dec 2021 10:06:19 +0800 Subject: [PATCH] deivce增加乡镇街道信息 --- 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