Helius
2020-06-19 5fd46ebbfe3c3bdc2aea660cd19d4f52de59f2da
src/main/resources/mapper/modules/MemberMapper.xml
@@ -39,4 +39,23 @@
        where invite_id=#{inviteId} and referer_id=#{refererId}
    </select>
    <select id="selectMemberFeeAmountTotal" resultType="com.xcong.excoin.modules.agent.entity.MemberEntity">
        select
            a.create_time,
            a.phone,
            a.email,
            a.referer_id,
            a.invite_id,
            concat(c.first_name, c.second_name) account,
            sum(b.opening_fee_amount) openFeeAmount,
            sum(b.closing_fee_amount) closeFeeAmount,
            sum(b.hold_amount) holdFeeAmount,
            sum(reward_amount) loseOrProfit
        from member a
        inner join member_authentication c on a.id=c.member_id
        inner join contract_order b on a.id=b.member_id and b.order_status=1
        where find_in_set(#{record.refererId}, a.referer_ids)
        group by a.create_time,a.phone, a.email
        order by a.create_time desc
    </select>
</mapper>