From 0f4df6c351d87054ded6bd54f0c6b9f6253ea56f Mon Sep 17 00:00:00 2001
From: zainali5120 <512061637@qq.com>
Date: Sun, 14 Mar 2021 20:42:51 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/whole_new' into whole_new

---
 src/main/resources/mapper/documentary/FollowTraderProfitInfoDao.xml |   35 ++++++++++++++++++++++++++++++++---
 1 files changed, 32 insertions(+), 3 deletions(-)

diff --git a/src/main/resources/mapper/documentary/FollowTraderProfitInfoDao.xml b/src/main/resources/mapper/documentary/FollowTraderProfitInfoDao.xml
index eb35811..d5d3cae 100644
--- a/src/main/resources/mapper/documentary/FollowTraderProfitInfoDao.xml
+++ b/src/main/resources/mapper/documentary/FollowTraderProfitInfoDao.xml
@@ -3,9 +3,38 @@
 <mapper namespace="com.xcong.excoin.modules.documentary.dao.FollowTraderProfitInfoDao">
 	
 	<select id="selectFollowTraderProfitInfoEntity" resultType="com.xcong.excoin.modules.documentary.vo.FollowTraderProfitInfoVo">
-		select * from follow_trader_profit_info f left join member m on f.member_id = m.id
-		where m.is_trader = 1
-        order by f.id desc
+		select * from follow_trader_profit_info f
+		    left join member m on f.member_id = m.id
+			left join follow_trader_info t on t.member_id = f.member_id
+		<where>
+			m.is_trader = 1
+			<if test="record.type != null and record.type != '' ">
+				and t.is_set_frist = #{record.type}
+			</if>
+			<if test="record.nickname != null and record.nickname != '' ">
+				and t.nickname like concat('%',#{record.nickname},'%')
+			</if>
+		</where>
+		order by
+		<if test="record.totalProfitRatioSc != null and record.totalProfitRatioSc != '' and record.totalProfitRatioSc == 1" >
+			f.total_profit_ratio,
+		</if>
+		<if test="record.totalProfitRatioSc != null and record.totalProfitRatioSc != '' and record.totalProfitRatioSc == 2" >
+			f.total_profit_ratio desc,
+		</if>
+		<if test="record.winRateSc != null and record.winRateSc != '' and record.winRateSc == 1" >
+			f.win_rate,
+		</if>
+		<if test="record.winRateSc != null and record.winRateSc != '' and record.winRateSc == 2" >
+			f.win_rate desc,
+		</if>
+		<if test="record.totalFollowerCntSc != null and record.totalFollowerCntSc != '' and record.totalFollowerCntSc == 1" >
+			f.total_follower_cnt,
+		</if>
+		<if test="record.totalFollowerCntSc != null and record.totalFollowerCntSc != '' and record.totalFollowerCntSc == 2" >
+			f.total_follower_cnt desc,
+		</if>
+		f.id desc
     </select>
     
 	<select id="selectOneByMemberId" resultType="com.xcong.excoin.modules.documentary.vo.FollowTraderProfitInfoVo">

--
Gitblit v1.9.1