From eb1adc13eda955e8ef0fc9fe41fb246fa89b722d Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期三, 06 五月 2020 14:03:56 +0800
Subject: [PATCH] 队员相关

---
 fanli/src/main/java/com/yeshi/fanli/mapping/ThreeSaleMapper.xml |   16 ++++++++++++++++
 1 files changed, 16 insertions(+), 0 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/mapping/ThreeSaleMapper.xml b/fanli/src/main/java/com/yeshi/fanli/mapping/ThreeSaleMapper.xml
index c950854..aea7c82 100644
--- a/fanli/src/main/java/com/yeshi/fanli/mapping/ThreeSaleMapper.xml
+++ b/fanli/src/main/java/com/yeshi/fanli/mapping/ThreeSaleMapper.xml
@@ -299,6 +299,10 @@
 		SELECT * FROM `yeshi_ec_threesale` ts
 		LEFT JOIN `yeshi_ec_threesale_extra_info` ff ON (ts.`boss_id` = ff.`tf_boss_id` AND ts.`worker_id`=ff.`tf_worker_id`)
 		WHERE ts.`boss_id` = #{uid}
+		 <if test="listId != null and listId.size > 0">
+			AND ts.worker_id in
+			<foreach collection="listId" item="item" open="(" separator="," close=")">#{item}</foreach>
+		</if>
 		ORDER BY ts.createTime DESC
 		LIMIT ${start},${count}
 	</select>
@@ -306,6 +310,10 @@
 	<select id="countFirstTeam" resultType="java.lang.Long">
 		SELECT IFNULL(count(id),0) FROM `yeshi_ec_threesale`
 		WHERE `boss_id` = #{uid}
+		<if test="listId != null and listId.size > 0">
+			AND worker_id in
+			<foreach collection="listId" item="item" open="(" separator="," close=")">#{item}</foreach>
+		</if>
 	</select>
 
 	<select id="listSecondTeam" resultMap="AllResultMap">
@@ -314,6 +322,10 @@
 			LEFT JOIN yeshi_ec_threesale tf ON ts.`boss_id`= tf.`worker_id`
 			WHERE tf.`boss_id` = #{uid})A
 		LEFT JOIN yeshi_ec_threesale yet ON yet.id = A.id
+		<if test="listId != null and listId.size > 0">
+			WHERE yet.worker_id in
+			<foreach collection="listId" item="item" open="(" separator="," close=")">#{item}</foreach>
+		</if>
 		ORDER BY yet.createTime DESC
 		LIMIT ${start},${count}
 	</select>
@@ -323,6 +335,10 @@
 			SELECT DISTINCT(ts.`id`) AS id FROM `yeshi_ec_threesale` ts
 			LEFT JOIN yeshi_ec_threesale tf ON ts.`boss_id`=tf.`worker_id`
 			WHERE tf.`boss_id` = #{uid}
+			<if test="listId != null and listId.size > 0">
+				AND tf.worker_id in
+				<foreach collection="listId" item="item" open="(" separator="," close=")">#{item}</foreach>
+			</if>
 		)A
 	</select>
 	

--
Gitblit v1.8.0