xiaoyong931011
2022-11-14 3393baab3fa89c8f85cff835f0ddd67f24b1634a
src/main/resources/mapper/dapp/DappMemberDao.xml
@@ -238,7 +238,8 @@
                inner join dapp_member b on a.member_id = b.id
        where
            a.total_amount <![CDATA[ >= ]]> 51
          and b.referer_id = #{inviteId}
          and
            (find_in_set(#{inviteId}, b.referer_ids) or b.invite_id = #{inviteId})
          and b.identity = #{identity}
    </select>
@@ -252,6 +253,68 @@
               a.*,b.username username
        from member_coin_charge a
        inner join dapp_member b on b.id = a.member_id
        <where>
            <if test="record.username !='' and record.username != null">
                and b.username = #{record.username}
            </if>
        </where>
        order  by create_time desc
    </select>
    <select id="selectTotalMemberByRefererIdAndIdentity" resultType="cc.mrbird.febs.dapp.entity.DappMemberEntity">
        select
            b.id,
            b.invite_id,
            b.referer_id,
            b.identity,
            b.referer_ids
        from
            dapp_wallet_coin a
                inner join dapp_member b on a.member_id = b.id
        where
            a.total_amount <![CDATA[ >= ]]> 51
          and b.referer_id = #{inviteId}
    </select>
    <select id="selectMessageListInPage" resultType="cc.mrbird.febs.dapp.entity.DappMessageEntity">
        select
        a.*,b.username username
        from dapp_message a
        left join dapp_member b on b.id = a.member_id
        <where>
            <if test="record.username !='' and record.username != null">
                and b.username = #{record.username}
            </if>
        </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}
            <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>
</mapper>