xiaoyong931011
2022-11-14 5c53b4e1e7dc2bae956332a0dc446992725c80bb
src/main/resources/mapper/dapp/MemberCoinWithdrawMapper.xml
@@ -4,14 +4,19 @@
    <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.username!=null and record.username!=''">
                    and m.username = #{record.username}
                </if>
                <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)))
                    and (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}
@@ -24,4 +29,14 @@
        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>