You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
48 lines
2.0 KiB
48 lines
2.0 KiB
11 months ago
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||
|
<!DOCTYPE mapper
|
||
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||
|
<mapper namespace="com.yingji.mapper.AlarmMapper">
|
||
|
|
||
|
|
||
|
<select id="page" resultType="com.yingji.entity.Alarm">
|
||
|
select * from alarm
|
||
|
<where>
|
||
|
<if test="req.startTime != null ">
|
||
|
emergency_event_time >= #{req.startTime}
|
||
|
</if>
|
||
|
<if test="req.endTime != null ">
|
||
|
and emergency_event_time <= #{req.endTime}
|
||
|
</if>
|
||
|
<if test="req.endTime != null ">
|
||
|
and emergency_event_time <= #{req.endTime}
|
||
|
</if>
|
||
|
<if test="req.emergencyEventDesc != null and req.emergencyEventDesc != ''">
|
||
|
and emergency_event_desc like concat('%', #{req.emergencyEventDesc}, '%')
|
||
|
</if>
|
||
|
<if test="req.emergencyEventAddress != null and req.emergencyEventAddress != ''">
|
||
|
and emergency_event_address like concat('%', #{req.emergencyEventAddress}, '%')
|
||
|
</if>
|
||
|
<if test="req.alarmPhoneNumber != null and req.alarmPhoneNumber != ''">
|
||
|
and alarm_phone_number like concat('%', #{req.alarmPhoneNumber}, '%')
|
||
|
</if>
|
||
|
<if test="req.aiClass != null and req.aiClass != ''">
|
||
|
and ai_class like concat('%', #{req.aiClass}, '%')
|
||
|
</if>
|
||
|
<if test="req.aiClass2 != null and req.aiClass2 != ''">
|
||
|
and ai_class2 like concat('%', #{req.aiClass2}, '%')
|
||
|
</if>
|
||
|
<if test="req.aiLevel != null and req.aiLevel != ''">
|
||
|
and ai_level like concat('%', #{req.aiLevel}, '%')
|
||
|
</if>
|
||
|
<if test="req.aiNumMin != null ">
|
||
|
and ai_num <= #{req.aiNumMin}
|
||
|
</if>
|
||
|
<if test="req.aiNumMax != null ">
|
||
|
and ai_num <= #{req.aiNumMax}
|
||
|
</if>
|
||
|
</where>
|
||
|
order by update_time desc
|
||
|
</select>
|
||
|
|
||
|
</mapper>
|