无关风月
2025-05-08 9486766c806fe1d9e082b2fd02ea1cc558f1b443
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
<?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.*,t2.name,t2.phone,CONCAT(t2.province,t2.city)as provinceAndCity from t_recharge_records t1
        left join t_app_user t2 on t1.appUserId = t2.id
        <where>
            <if test="query.amount!=null and query.amount!= ''">
                and t1.amount &lt;= #{query.amount}
            </if>
            <if test="query.objectId!=null and query.objectId!= ''">
                and t2.addUserId = #{query.objectId}
            </if>
            <if test="query.insertType!=null and query.insertType!= ''">
                and t2.insertType = #{query.insertType}
            </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="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''">
                and t1.insertTime between #{sTime} and #{eTime}
            </if>
            <if test="query.userIds != null and query.userIds.size()>0">
                AND t1.appUserId IN
                <foreach collection="query.userIds" separator="," item="id" open="(" close=")">
                    #{id}
                </foreach>
            </if>
            and t1.payStatus = 2
        </where>
    </select>
    <select id="listAll" resultType="com.dsh.account.entity.VipPayment">
        select t1.* from t_vip_payment t1
        left join t_app_user t2 on t1.appUserId = t2.id
        <where>
            <if test="amount!=null and amount!= ''">
                and t1.amount &lt;= #{amount}
            </if>
            <if test="query.insertType!=null and query.insertType!= ''">
                and t2.insertType = #{query.insertType}
            </if>
            <if test="query.userIds != null and query.userIds.size()>0">
                AND t1.appUserId IN
                <foreach collection="query.userIds" separator="," item="id" open="(" close=")">
                    #{id}
                </foreach>
            </if>
            <if test="sTime !=null and sTime!= '' and eTime !=null and eTime!= ''">
                and t1.insertTime between #{sTime} and #{eTime}
            </if>
            and t1.payStatus = 2
        </where>
    </select>
</mapper>