彭雪彬
2025-07-01 45131ab1e3c87c30343c885414298259e6627ffd
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
72
<?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.RiderWithdrawalRecordMapper">
    <resultMap id="BaseResultMap" type="com.oying.modules.rider.domain.RiderWithdrawalRecord">
        <id column="record_id" property="recordId"/>
        <result column="rider_id" property="riderId"/>
        <result column="rider_name" property="riderName"/>
        <result column="rider_phone" property="riderPhone"/>
        <result column="amount" property="amount"/>
        <result column="withdrawal_amount" property="withdrawalAmount"/>
        <result column="now_amount" property="nowAmount"/>
        <result column="fee" property="fee"/>
        <result column="actual_amount" property="actualAmount"/>
        <result column="status" property="status"/>
        <result column="bank_account" property="bankAccount"/>
        <result column="bank_name" property="bankName"/>
        <result column="apply_time" property="applyTime"/>
        <result column="process_time" property="processTime"/>
        <result column="operator" property="operator"/>
        <result column="remark" property="remark"/>
        <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">
        record_id, rider_id, rider_name, rider_phone, amount, withdrawal_amount, now_amount, fee, actual_amount, status, bank_account, bank_name, apply_time, process_time, operator, remark, create_by, create_time, update_by, update_time
    </sql>
 
    <select id="findAll" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List"/>
        from qs_rider_withdrawal_record
        <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.status != null">
                and status = #{criteria.status}
            </if>
            <if test="criteria.bankAccount != null">
                and bank_account = #{criteria.bankAccount}
            </if>
            <if test="criteria.bankName != null">
                and bank_name like concat('%',#{criteria.bankName},'%')
            </if>
            <if test="criteria.operator != null">
                and operator = #{criteria.operator}
            </if>
            <if test="criteria.remark != null">
                and remark like concat('%',#{criteria.remark},'%')
            </if>
            <if test="criteria.applyTime != null and criteria.applyTime.size() > 0">
                AND apply_time BETWEEN #{criteria.applyTime[0]} AND #{criteria.applyTime[1]}
            </if>
            <if test="criteria.processTime != null and criteria.processTime.size() > 0">
                AND process_time BETWEEN #{criteria.processTime[0]} AND #{criteria.processTime[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 record_id desc
    </select>
</mapper>