You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
backend-duoji-monitor/web/target/classes/mapper/WarnMapper.xml

21 lines
840 B
XML

4 years 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.zhehekeji.web.mapper.WarnMapper">
<select id="list" parameterType="com.zhehekeji.web.pojo.warn.WarnSearch" resultType="com.zhehekeji.web.pojo.warn.WarnVO">
select t.*,s.name as streetName
from warn t
left join street s on s.id = t.street_id
<where>
<if test="req.startTime != null and req.endTime != null">
and t.start_time >= #{req.startTime} and t.start_time &lt;= #{req.endTime}
</if>
<if test="req.streetId != null and req.streetId != 0">
and t.street_id = #{req.streetId}
</if>
</where>
order by t.id desc
</select>
</mapper>