KKSU
2024-06-06 424ad35dcd1fafb51a0ba77523b11e6871f2858c
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
<?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.dapp.mapper.MemberCoinWithdrawDao">
 
    <select id="findMemberWithdrawCoinInPage" resultType="cc.mrbird.febs.dapp.vo.AdminMemberCoinWithdrawVo">
        SELECT
        s.*
        FROM
        member_coin_withdraw s
        left join dapp_member m on m.id = s.member_id
        <where>
            <if test="record != null" >
                <if test="record.currentUser != null">
                    and m.referer_id = (select invite_id from dapp_user_member_relate where user_id=#{record.currentUser})
                </if>
                <if test="record.isInside!=null and record.isInside!=''">
                    and s.is_inside= #{record.isInside}
                </if>
                <if test="record.address!=null and record.address!=''">
                    and s.address= #{record.address}
                </if>
                <if test="record.status!=null and record.status!=''">
                    and s.status= #{record.status}
                </if>
            </if>
        </where>
        order by s.create_time desc
    </select>
 
    <select id="selectByMemberIdAndCreateTime" resultType="java.lang.Integer">
        SELECT
        count (a.id)
        FROM
        member_coin_withdraw a
        where a.member_id = #{memberId}
            and date_format(a.create_time, '%Y-%m-%d') = #{createTime}
            and a.is_inside = #{type}
    </select>
 
</mapper>