| | |
| | | <select id="selectAgentReturnList" resultType="com.xcong.excoin.modules.contract.entity.AgentReturnEntity"> |
| | | select |
| | | CONCAT(b.first_name, b.second_name) account, |
| | | a.closing_fee_amount*(select fee_spread_ratio from platform_trade_setting) closing_fee_amount, |
| | | a.opening_fee_amount*(select fee_spread_ratio from platform_trade_setting) opening_fee_amount, |
| | | a.*, |
| | | c.phone, |
| | | c.email |
| | | from kss_framework.agent_return a |
| | | from agent_return a |
| | | left join member_authentication b on a.member_id=b.member_id |
| | | left join member c on a.member_id=c.id |
| | | where invite_id=#{record.inviteId} |
| | | inner join member c on a.member_id=c.id |
| | | <where> |
| | | <if test="record.inviteId!='rxadr3'"> |
| | | and a.invite_id=#{record.inviteId} |
| | | </if> |
| | | <if test='record.timeType=="1"'> |
| | | and TO_DAYS(a.create_time) = TO_DAYS(NOW()) |
| | | </if> |
| | | <if test='record.timeType=="2"'> |
| | | and TO_DAYS(NOW()) - TO_DAYS(a.create_time) = 1 |
| | | </if> |
| | | <if test='record.timeType=="3"'> |
| | | and YEARWEEK(date_format(a.create_time,'%Y-%m-%d')) = YEARWEEK(now()) |
| | | </if> |
| | | <if test='record.timeType=="4"'> |
| | | and DATE_FORMAT(a.create_time, '%Y%m' ) = DATE_FORMAT( CURDATE() , '%Y%m' ) |
| | | </if> |
| | | <if test='record.account!=null and record.account!=""'> |
| | | and (c.phone=#{record.account} or c.email=#{record.account} or c.invite_id=#{record.account}) |
| | | </if> |
| | | </where> |
| | | order by create_time desc |
| | | </select> |
| | | </mapper> |