xiaoyong931011
2022-10-31 112b6a2ca8a55f056cc259b6bd9ed554fcc263f7
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
<?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.*,
        (select a.username from dapp_member a where s.address = a.invite_id and s.is_inside = 'Y') usernameIn,
        m.username username
        FROM
        member_coin_withdraw s
        left join dapp_member m on m.id = s.member_id
        <where>
            <if test="record != null" >
                <if test="record.description!=null and record.description!=''">
                    (s.member_id in (select id from dapp_member where FIND_IN_SET(#{record.description}, referer_ids)))
                </if>
                <if test="record.isInside!=null and record.isInside!=''">
                    and s.is_inside= #{record.isInside}
                </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.type = #{type}
    </select>
 
</mapper>