liujie
2023-09-25 8c55ab2701c99cec16eff92a26fefdf77fcdd28f
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
<?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.dsh.account.mapper.RechargeRecordsMapper">
 
 
    <select id="rechargeList" resultType="com.dsh.account.model.vo.RechargeRecordsVO">
        select t1.id as id,t1.appUserId,t1.payTime as `time`,t1.amount as amount,
        t1.playPaiCoins as playPaiCoins,CONCAT(t2.province,t2.city) as provinceAndCity,
        t2.`name` as `name`,t2.phone as phone,t2.isVip as `type` from t_recharge_records t1
        left join t_app_user t2 on t2.id = t1.appUserId
        <where>
            <if test="query.city!=null and query.city!= ''">
                and t1.city = #{query.city}
            </if>
            <if test="query.province!=null and query.province!= ''">
                and t1.province = #{query.province}
            </if>
            <if test="query.name!=null and query.name!= ''">
                AND t1.name LIKE concat('%',#{query.name},'%')
            </if>
            <if test="query.phone!=null and query.phone!= ''">
                and t1.phone LIKE concat('%',#{query.phone},'%')
            </if>
            <if test="query.type!=null and query.type!= ''">
                and t2.isVip = #{query.type}
            </if>
            <if test="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''">
                and t1.payTime between #{sTime} and #{eTime}
            </if>
            and t1.state != 3
        </where>
    </select>
</mapper>