From e84072e09a70e0795e464c91c7a81c91d205f29b Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Tue, 07 Jul 2020 20:19:51 +0800 Subject: [PATCH] modify --- src/main/resources/mapper/modules/ContractOrderMapper.xml | 22 +++++++++++++++++++++- 1 files changed, 21 insertions(+), 1 deletions(-) diff --git a/src/main/resources/mapper/modules/ContractOrderMapper.xml b/src/main/resources/mapper/modules/ContractOrderMapper.xml index ff105da..ea41bc4 100644 --- a/src/main/resources/mapper/modules/ContractOrderMapper.xml +++ b/src/main/resources/mapper/modules/ContractOrderMapper.xml @@ -8,14 +8,34 @@ a.email, a.referer_id, concat(b.first_name, b.second_name) name, + c.opening_fee_amount*(select fee_spread_ratio from platform_trade_setting) opening_fee_amount, + c.closing_fee_amount*(select fee_spread_ratio from platform_trade_setting) closing_fee_amount, c.* from member a inner join member_authentication b on a.id=b.member_id inner join contract_order c on a.id=c.member_id <where> <if test="record!=null"> + <if test="record.refererIds!=null and record.refererIds!=''"> + find_in_set(#{record.refererIds}, a.referer_ids) + </if> <if test="record.refererId!=null and record.refererId!=''"> - find_in_set(#{record.refererId}, a.referer_ids) + and a.referer_id=#{record.refererId} + </if> + <if test="record.name!=null and record.name!=''"> + and (a.phone=#{record.name} or a.email=#{record.name} or a.invite_id=#{record.name}) + </if> + <if test='record.timeType=="1"'> + and TO_DAYS(c.create_time) = TO_DAYS(NOW()) + </if> + <if test='record.timeType=="2"'> + and TO_DAYS(NOW()) - TO_DAYS(c.create_time) = 1 + </if> + <if test='record.timeType=="3"'> + and YEARWEEK(date_format(c.create_time,'%Y-%m-%d')) = YEARWEEK(now()) + </if> + <if test='record.timeType=="4"'> + and DATE_FORMAT(c.create_time, '%Y%m' ) = DATE_FORMAT( CURDATE() , '%Y%m' ) </if> and order_status = 1 </if> -- Gitblit v1.9.1