From 5fd46ebbfe3c3bdc2aea660cd19d4f52de59f2da Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Fri, 19 Jun 2020 18:02:53 +0800 Subject: [PATCH] modify --- src/main/resources/mapper/modules/MemberMapper.xml | 26 ++++++++++++++++++++++++-- 1 files changed, 24 insertions(+), 2 deletions(-) diff --git a/src/main/resources/mapper/modules/MemberMapper.xml b/src/main/resources/mapper/modules/MemberMapper.xml index 99a3e52..172a8f7 100644 --- a/src/main/resources/mapper/modules/MemberMapper.xml +++ b/src/main/resources/mapper/modules/MemberMapper.xml @@ -6,7 +6,10 @@ <select id="selectMemberListInPage" resultType="com.xcong.excoin.modules.agent.entity.MemberEntity"> select * from member <where> - <if test="record != null" > + <if test="record != null"> + <if test="record.inviteId !=null and record.inviteId!=''"> + and find_in_set(#{record.inviteId}, referer_ids) + </if> <if test="record.startTime!=null"> and create_time >=#{record.startTime} </if> @@ -19,7 +22,7 @@ <if test="record.accountStatus!=null"> and account_status = #{record.accountStatus} </if> - <if test="record.accountType != null" > + <if test="record.accountType != null"> and account_type = #{record.accountType} </if> <if test="record.certifyStatus != null"> @@ -36,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> \ No newline at end of file -- Gitblit v1.9.1