luodangjia
2025-01-15 2bc35df79fca920ad584a82b5ea7b35b6ca7b8a0
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
<?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.ruoyi.account.mapper.WithdrawalRequestsMapper">
 
    <!-- 通用查询映射结果 -->
    <resultMap id="BaseResultMap" type="com.ruoyi.account.api.model.WithdrawalRequests">
        <id column="id" property="id" />
        <result column="del_flag" property="delFlag" />
        <result column="create_time" property="createTime" />
        <result column="app_user_id" property="appUserId" />
        <result column="withdrawal_amount" property="withdrawalAmount" />
        <result column="withdrawal_method" property="withdrawalMethod" />
        <result column="account_holder" property="accountHolder" />
        <result column="bank_card_number" property="bankCardNumber" />
        <result column="audit_status" property="auditStatus" />
    </resultMap>
 
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, del_flag, create_time, app_user_id, withdrawal_amount, withdrawal_method, account_holder, bank_card_number, audit_status
    </sql>
    <select id="pageList" resultType="com.ruoyi.account.api.model.WithdrawalRequests">
        select t1.*,t2.name as userName,t2.phone as userPhone
        from t_withdrawal_requests t1
        left join t_app_user t2 on t1.app_user_id = t2.id
        where 1 = 1
        <if test="withQuery.userPhone != null and withQuery.userPhone != ''">
            AND t2.phone LIKE concat('%',#{withQuery.userPhone},'%')
        </if>
        <if test="withQuery.userName != null and withQuery.userName != ''">
            AND t2.name LIKE concat('%',#{withQuery.userName},'%')
        </if>
        order by t1.create_time desc
    </select>
 
</mapper>