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.
 
 

44 lines
1.5 KiB

<?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.ccsens.health.persist.dao.JourneyAbnormalDao">
<resultMap id="resultMap_journey_abnormal" type="com.ccsens.health.bean.vo.JourneyVo$AddAbnormalJourney">
<id column="id" property="id"/>
<result column="tripMode" property="tripMode"/>
<result column="carNo" property="carNo"/>
<result column="startTime" property="startTime"/>
<result column="endTime" property="endTime"/>
<result column="description" property="description"/>
</resultMap>
<select id="selectAbnormalJourney" resultMap="resultMap_journey_abnormal" parameterType="java.util.Map">
select
id as id,
trip_mode as tripMode,
car_no as carNo,
start_time as startTime,
end_time as endTime,
description as description
from
t_journey_abnormal
where
rec_status = 0
<if test="carNo != null and carNo !=''">
and
car_no = #{carNo}
</if>
<if test="tripMode != null">
and
trip_mode = #{tripMode}
</if>
<if test="endTime != null">
and
start_time &lt;= #{endTime}
</if>
<if test="startTime != null">
and
end_time &gt;= #{startTime}
</if>
ORDER BY start_time DESC
</select>
</mapper>