<?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.oying.modules.rider.mapper.RiderOrderReminderMapper">
|
<resultMap id="BaseResultMap" type="com.oying.modules.rider.domain.RiderOrderReminder">
|
<id column="reminder_id" property="reminderId"/>
|
<result column="rider_id" property="riderId"/>
|
<result column="rider_name" property="riderName"/>
|
<result column="rider_phone" property="riderPhone"/>
|
<result column="order_id" property="orderId"/>
|
<result column="order_num" property="orderNum"/>
|
<result column="rule_id" property="ruleId"/>
|
<result column="rule_content" property="ruleContent"/>
|
<result column="rule_type" property="ruleType"/>
|
<result column="reminder_time" property="reminderTime"/>
|
<result column="is_sent" property="isSent"/>
|
<result column="send_time" property="sendTime"/>
|
<result column="create_by" property="createBy"/>
|
<result column="create_time" property="createTime"/>
|
<result column="update_by" property="updateBy"/>
|
<result column="update_time" property="updateTime"/>
|
</resultMap>
|
|
<sql id="Base_Column_List">
|
reminder_id, rider_id, rider_name, rider_phone, order_id, order_num, rule_id, rule_content, rule_type, reminder_time, is_sent, send_time, create_by, create_time, update_by, update_time
|
</sql>
|
|
<select id="findAll" resultMap="BaseResultMap">
|
select
|
<include refid="Base_Column_List"/>
|
from qs_rider_order_reminder
|
<where>
|
<if test="criteria.riderId != null">
|
and rider_id = #{criteria.riderId}
|
</if>
|
<if test="criteria.riderName != null">
|
and rider_name = #{criteria.riderName}
|
</if>
|
<if test="criteria.riderPhone != null">
|
and rider_phone = #{criteria.riderPhone}
|
</if>
|
<if test="criteria.orderId != null">
|
and order_id = #{criteria.orderId}
|
</if>
|
<if test="criteria.orderNum != null">
|
and order_num = #{criteria.orderNum}
|
</if>
|
<if test="criteria.ruleId != null">
|
and rule_id = #{criteria.ruleId}
|
</if>
|
<if test="criteria.ruleContent != null">
|
and rule_content like concat('%',#{criteria.ruleContent},'%')
|
</if>
|
<if test="criteria.ruleType != null">
|
and rule_type = #{criteria.ruleType}
|
</if>
|
<if test="criteria.isSent != null">
|
and is_sent = #{criteria.isSent}
|
</if>
|
<if test="criteria.reminderTime != null and criteria.reminderTime.size() > 0">
|
AND reminder_time BETWEEN #{criteria.reminderTime[0]} AND #{criteria.reminderTime[1]}
|
</if>
|
<if test="criteria.sendTime != null and criteria.sendTime.size() > 0">
|
AND send_time BETWEEN #{criteria.sendTime[0]} AND #{criteria.sendTime[1]}
|
</if>
|
<if test="criteria.createTime != null and criteria.createTime.size() > 0">
|
AND create_time BETWEEN #{criteria.createTime[0]} AND #{criteria.createTime[1]}
|
</if>
|
</where>
|
order by reminder_id desc
|
</select>
|
</mapper>
|