xin
5 days ago 044a57d2133b2363a6f0d3d167b3eaa587c70b91
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
<?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>