无关风月
2025-03-21 0f8dce61fdc6cc174ab891e9867934324df2e489
ManagementOKTravel/guns-admin/src/main/java/com/stylefeng/guns/modular/system/dao/mapping/TPubWithdrawalMapper.xml
@@ -27,22 +27,21 @@
    <!--根据条件查询提现列表-->
    <select id="getWithdrawalList" resultType="map" parameterType="com.baomidou.mybatisplus.plugins.Page">
        SELECT * FROM (SELECT
        case when pw.userType = 1 then uu.nickName when pw.userType = 2 then dd.`name` else '' end as userName,
        case when pw.userType = 1 then uu.phone when pw.userType = 2 then dd.phone else '' end as userPhone,
        dd.`name`as userName,
        dd.phone as userPhone,
        dd.balance as balance,
        pw.*
        FROM t_pub_withdrawal as pw
        LEFT JOIN t_user as uu on uu.id = pw.userId
        LEFT JOIN t_driver as dd on dd.id = pw.userId) as o
        FROM t_withdrawal as pw
        LEFT JOIN t_driver as dd on dd.id = pw.driverId) as o
        <where>
            o.flag != 3
            <if test="beginTime != null and beginTime != '' and endTime != null and endTime != ''">
                AND (o.insertTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59'))
                AND (o.withdrawalTime between CONCAT(#{beginTime},' 00:00:00') and CONCAT(#{endTime},' 23:59:59'))
            </if>
            <if test="name != null and name != ''">
                and o.name  LIKE CONCAT('%',#{name},'%')
                and o.userName  LIKE CONCAT('%',#{name},'%')
            </if>
            <if test="withdrawalType != null and withdrawalType != ''">
                and o.withdrawalType = #{withdrawalType}
                and o.status = #{withdrawalType}
            </if>
        </where>
        order by o.id desc