KKSU
2024-12-20 19c3da86d8c6adcb91baccac6981c63307e3dba1
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
73
74
75
76
77
78
79
<?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="cc.mrbird.febs.mall.mapper.MallChargeMapper">
 
    <select id="selectChargeListInPage" resultType="cc.mrbird.febs.mall.vo.ApiChargeVo">
        SELECT
            b.phone account,
            a.vip_name vipName,
            a.vip_cnt vipCnt,
            a.order_no orderNo,
            a.state state,
            a.created_time createdTime,
            a.type type,
            a.amount amount,
            a.address address
        FROM mall_charge a
                 inner join mall_member b on a.member_id = b.id
        where member_id = #{record.memberId}
        order by a.created_time desc
    </select>
 
    <select id="selectAdminChargeListInPage" resultType="cc.mrbird.febs.mall.entity.MallCharge">
        SELECT
        a.id id,
        a.order_no orderNo,
        a.state state,
        a.address address,
        a.amount amount,
        a.type type,
        a.fail_time failTime,
        a.sys_address sysAddress,
        a.CREATED_TIME createdTime,
        a.vip_name vipName,
        a.vip_cnt vipCnt,
        b.phone account
        FROM mall_charge a
        inner join mall_member b on a.member_id = b.id
        <where>
            <if test="record != null" >
                <if test="record.account!=null and record.account!=''">
                    and b.phone like concat('%',  #{record.account},'%')
                </if>
                <if test="record.orderNo!=null and record.orderNo!=''">
                    and a.order_no like concat('%',  #{record.orderNo},'%')
                </if>
                <if test="record.state!=null">
                    and a.state = #{record.state}
                </if>
            </if>
        </where>
        order by a.created_time desc
    </select>
 
    <select id="selectAdminWithdrawListInPage" resultType="cc.mrbird.febs.mall.entity.MallMemberWithdraw">
        SELECT
        a.*,
        b.phone account
        FROM mall_member_withdraw a
        inner join mall_member b on a.member_id = b.id
        <where>
            <if test="record != null" >
                <if test="record.account!=null and record.account!=''">
                    and b.phone like concat('%',  #{record.account},'%')
                </if>
                <if test="record.withdrawNo!=null and record.withdrawNo!=''">
                    and a.withdraw_no like concat('%',  #{record.withdrawNo},'%')
                </if>
                <if test="record.name!=null and record.name!=''">
                    and a.name like concat('%',  #{record.name},'%')
                </if>
                <if test="record.status!=null">
                    and a.status = #{record.status}
                </if>
            </if>
        </where>
        order by a.created_time desc
    </select>
 
</mapper>