From e54bc01ed3a571abc9de4dd4c32893e8741bb0f0 Mon Sep 17 00:00:00 2001 From: jpy <812110275@qq.com> Date: Sat, 27 May 2023 15:13:28 +0800 Subject: [PATCH] test --- screen-api/src/main/resources/mapper/AlarmInfoMapper.xml | 18 ++++++++++++++++++ 1 files changed, 18 insertions(+), 0 deletions(-) diff --git a/screen-api/src/main/resources/mapper/AlarmInfoMapper.xml b/screen-api/src/main/resources/mapper/AlarmInfoMapper.xml index 187b2e5..d49905f 100644 --- a/screen-api/src/main/resources/mapper/AlarmInfoMapper.xml +++ b/screen-api/src/main/resources/mapper/AlarmInfoMapper.xml @@ -32,6 +32,24 @@ limit #{start},#{size} </select> + <select id="selectDataByConditionWithoutPage" 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 + <if test="index != null"> + and ai.index = #{index} + </if> + <if test="alarmType != null"> + and ai.alarm_type = #{alarmType} + </if> + and alarm_time between #{startTime} and #{endTime} + ORDER by ai.create_time DESC + </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 -- Gitblit v1.8.0