xiaoyong931011
2022-11-18 a91a21204ac4420b8d2c2c1ec2fc336f699ecf97
src/main/resources/mapper/dapp/DappMemberDao.xml
@@ -15,11 +15,13 @@
    <select id="selectInPage" resultType="cc.mrbird.febs.dapp.entity.DappMemberEntity">
        select a.*,
               c.username refererName,
               b.total_amount totalAmount,
               b.frozen_amount frozenAmount,
               b.available_amount availableAmount
               from dapp_member a
        left join dapp_wallet_coin b on a.id = b.member_id
        left join dapp_member c on a.referer_id = c.invite_id
        <where>
<!--            <if test="record.currentUser != null">-->
<!--                and referer_id = (select invite_id from dapp_user_member_relate where user_id=#{record.currentUser})-->
@@ -289,4 +291,43 @@
        </where>
        order  by create_time desc
    </select>
    <select id="getChargeListByDayInPage" resultType="cc.mrbird.febs.dapp.entity.MemberCoinChargeEntity">
        select
        a.*,b.username username
        from member_coin_charge a
        left join dapp_member b on b.id = a.member_id
        <where>
            date_format(a.create_time, '%Y-%m-%d')  = #{record.createTimeStr}
            <if test="record.description!=null and record.description!=''">
                and (a.member_id in (select id from dapp_member where FIND_IN_SET(#{record.description}, referer_ids)))
            </if>
        </where>
        order  by a.create_time desc
    </select>
    <select id="getWithDrawListByDayInPage" resultType="cc.mrbird.febs.dapp.vo.AdminMemberCoinWithdrawVo">
        select
        a.*,b.username username
        from member_coin_withdraw a
        left join dapp_member b on b.id = a.member_id
        <where>
            date_format(a.create_time, '%Y-%m-%d')  = #{record.createTimeStr}
            and a.is_inside = 'N'
            <if test="record.description!=null and record.description!=''">
                and (a.member_id in (select id from dapp_member where FIND_IN_SET(#{record.description}, referer_ids)))
            </if>
        </where>
        order  by a.create_time desc
    </select>
    <select id="findTeamInfoListInPage" resultType="cc.mrbird.febs.dapp.vo.AdminTeamInfoVo">
        select
        a.username username,
        a.id id
        from dapp_member a
        where
        (a.id in (select id from dapp_member where FIND_IN_SET(#{record.inviteId}, referer_ids)))
        order  by a.create_time desc
    </select>
</mapper>