From 0ca7bf5c850eaef852a6b49d4b94e8366deedb29 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Wed, 26 May 2021 15:03:51 +0800
Subject: [PATCH] 20210525  申诉

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

diff --git a/src/main/resources/mapper/documentary/FollowTraderProfitInfoDao.xml b/src/main/resources/mapper/documentary/FollowTraderProfitInfoDao.xml
index ff812a6..d5d3cae 100644
--- a/src/main/resources/mapper/documentary/FollowTraderProfitInfoDao.xml
+++ b/src/main/resources/mapper/documentary/FollowTraderProfitInfoDao.xml
@@ -3,8 +3,42 @@
 <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 
-        order by 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">
+		select * from follow_trader_profit_info where member_id = #{memberId} 
     </select>
     
 	<select id="selectHistoryOrderRecords" resultType="com.xcong.excoin.modules.documentary.vo.HistoryOrderRecordsVo">
@@ -27,5 +61,9 @@
 			and closing_type not in (4,5)
 		order by opening_time desc
     </select>
-    
+
+	<select id="selectTraderInfoProfitByMemberId" resultType="com.xcong.excoin.modules.documentary.entity.FollowTraderProfitInfoEntity">
+		select * from follow_trader_profit_info
+		where member_id=#{memberId}
+	</select>
 </mapper>
\ No newline at end of file

--
Gitblit v1.9.1