From 4faf5799dec481819b203ca32ec3a665e1b7648a Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Tue, 30 Jun 2020 18:09:24 +0800 Subject: [PATCH] modify --- src/main/resources/mapper/modules/MemberMapper.xml | 18 +++++++++++++++--- 1 files changed, 15 insertions(+), 3 deletions(-) diff --git a/src/main/resources/mapper/modules/MemberMapper.xml b/src/main/resources/mapper/modules/MemberMapper.xml index e745126..fdb726d 100644 --- a/src/main/resources/mapper/modules/MemberMapper.xml +++ b/src/main/resources/mapper/modules/MemberMapper.xml @@ -60,7 +60,13 @@ sum(hold_amount) holdAmount, sum(reward_amount) rewardAmount from contract_order where order_type in (3,4) and order_status=1 group by member_id) d on a.id=d.member_id - where find_in_set(#{record.refererId}, a.referer_ids) + where find_in_set(#{record.refererIds}, a.referer_ids) + <if test="record.account!=null and record.account!=''"> + and (a.phone=#{record.account} or a.email=#{record.account} or a.invite_id=#{record.account}) + </if> + <if test="record.refererId!=null and record.refererId!=''"> + and a.referer_id=#{record.refererId} + </if> group by a.create_time,a.phone, a.email order by a.create_time desc </select> @@ -75,12 +81,18 @@ b.total_balance contractTotal, c.total_balance coinTotal, d.total_balance agentTotal - from kss_framework.member a + from member a left join member_wallet_contract b on a.id=b.member_id left join member_wallet_coin c on a.id=c.member_id and c.wallet_code='USDT' left join member_wallet_agent d on a.id=d.member_id left join member_authentication e on a.id=e.member_id - where find_in_set(#{record.refererId}, a.referer_ids) + where find_in_set(#{record.refererIds}, a.referer_ids) + <if test="record.account!=null and record.account!=''"> + and (a.phone=#{record.account} or a.email=#{record.account} or a.invite_id=#{record.account}) + </if> + <if test="record.refererId!=null and record.refererId!=''"> + and a.referer_id=#{record.refererId} + </if> order by a.create_time desc </select> </mapper> \ No newline at end of file -- Gitblit v1.9.1