From 7e7db2fa55a9a3af46d4fd8ede0dee147f101d64 Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期六, 09 五月 2020 21:41:27 +0800
Subject: [PATCH] 2.1需求

---
 fanli/src/main/java/com/yeshi/fanli/dao/mybatis/ThreeSaleMapper.java |  213 +++++++++++++++++++++--------------------------------
 1 files changed, 84 insertions(+), 129 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/dao/mybatis/ThreeSaleMapper.java b/fanli/src/main/java/com/yeshi/fanli/dao/mybatis/ThreeSaleMapper.java
index 15b198d..e0d9efc 100644
--- a/fanli/src/main/java/com/yeshi/fanli/dao/mybatis/ThreeSaleMapper.java
+++ b/fanli/src/main/java/com/yeshi/fanli/dao/mybatis/ThreeSaleMapper.java
@@ -15,89 +15,52 @@
 
 	int insertSelective(ThreeSale record);
 
-	ThreeSale selectByPrimaryKey(Long id);
-
-	UserInfo selectBoss(Long uid);
-
-	List<ThreeSale> selectByUid(Long uid);
-
+	int updateByPrimaryKey(ThreeSale record);
+	
 	int updateByPrimaryKeySelective(ThreeSale record);
 
-	int updateByPrimaryKey(ThreeSale record);
-
-	int effectThreeSale(Long workerUid);
+	ThreeSale selectByPrimaryKey(Long id);
+	
+	
+	UserInfo selectBoss(Long uid);
 	
 	/**
-	 * 鍒犻櫎澶辨晥
-	 * @param bossId
+	 * 鏍规嵁琚個璇疯�匢D鏌ヨ
+	 * 
 	 * @param workerId
 	 * @return
 	 */
-	int deleteExpireRecord(@Param("bossId")Long bossId, @Param("workerId")Long workerId);
+	ThreeSale getByWorkerId(Long workerId);
 	
+
 	/**
-	 * 澶辨晥
-	 * @param bossId
+	 * 
+	 * @param uid
+	 * @return
+	 */
+	ThreeSale getMyBoss(@Param("uid") Long uid);
+	
+
+	/**
+	 * 鏍规嵁涓嬬骇鏌ヨ鎴愬姛鐨勯個璇峰叧绯�
 	 * @param workerId
 	 * @return
 	 */
-	List<ThreeSale> getExpireRecord(@Param("bossId")Long bossId, @Param("workerId")Long workerId);
+	ThreeSale selectSuccessByWorkerId(Long workerId);
+
+	
+	/**
+	 * 鏍规嵁閭�璇疯�匢D鏌ヨ鍏崇郴
+	 * 
+	 * @param workerId
+	 * @return
+	 */
+	List<ThreeSale> listByWorkerId(Long workerId);
+	
 	
 
 	/**
-	 * 鏌ヨ涓�搴﹂槦鍛橀泦鍚�
-	 * 
-	 * @param start
-	 * @param count
-	 * @param key
-	 * @param uid
-	 * @return
-	 */
-	List<ThreeSale> queryMyFirstTeamList(@Param("start") int start, @Param("count") int count, @Param("key") String key,
-			@Param("bossId") Long bossId);
-
-	long queryCountMyFirstTeamList(@Param("key") String key, @Param("bossId") Long bossId);
-
-	/**
-	 * 鏌ヨ浜屽害闃熷憳闆嗗悎
-	 * 
-	 * @param start
-	 * @param count
-	 * @param key
-	 * @param uid
-	 * @return
-	 */
-	List<ThreeSale> queryMySecondTeamList(@Param("start") int start, @Param("count") int count,
-			@Param("key") String key, @Param("bossId") Long bossId);
-
-	long queryCountMySecondTeamList(@Param("key") String key, @Param("bossId") Long bossId);
-
-	/**
-	 * 闀挎椂闂存湭閭�璇锋垚鍔熺敤鎴�
-	 * 
-	 * @param daysNum
-	 * @return
-	 */
-	List<Long> queryLongTimeFailed(@Param("daysNum") int daysNum);
-
-	/**
-	 * 闀挎椂闂� 閭�璇锋垚鍔熺敤鎴�
-	 * 
-	 * @param daysNum
-	 * @return
-	 */
-	List<ThreeSale> queryLongTimeSuccess(@Param("daysNum") int daysNum);
-
-	/**
-	 * 璁剧疆瀵瑰簲閭�璇疯繃鏈�
-	 * 
-	 * @param list
-	 * @return
-	 */
-	int updateExpire(List<Long> list);
-
-	/**
-	 * 涓�绾ф煡璇�
+	 * 涓�绾ф煡璇�-鍚庡彴鏌ヨ
 	 * 
 	 * @param start
 	 * @param count
@@ -107,13 +70,14 @@
 	 * @return
 	 */
 	List<ThreeSale> listFirstTeamQuery(@Param("start") long start, @Param("count") int count, @Param("uid") Long uid,
-			@Param("state") Integer state, @Param("startTime") String startTime, @Param("endTime") String endTime);
+			@Param("state") Integer state, @Param("startTime") String startTime, @Param("endTime") String endTime,
+			@Param("validState") Integer validState);
 
-	long countFirstTeamQuery(@Param("uid") Long uid, @Param("state") Integer state,
-			@Param("startTime") String startTime, @Param("endTime") String endTime);
+	long countFirstTeamQuery(@Param("uid") Long uid, @Param("state") Integer state, @Param("startTime") String startTime,
+			@Param("endTime") String endTime, @Param("validState") Integer validState);
 
 	/**
-	 * 浜岀骇鏌ヨ
+	 * 浜岀骇鏌ヨ -鍚庡彴鏌ヨ
 	 * 
 	 * @param start
 	 * @param count
@@ -123,13 +87,14 @@
 	 * @return
 	 */
 	List<ThreeSale> listSecondTeamQuery(@Param("start") long start, @Param("count") int count, @Param("uid") Long uid,
-			@Param("state") Integer state, @Param("startTime") String startTime, @Param("endTime") String endTime);
+			@Param("state") Integer state, @Param("startTime") String startTime, @Param("endTime") String endTime
+			,@Param("validState") Integer validState);
 
 	long countSecondTeamQuery(@Param("uid") Long uid, @Param("state") Integer state,
-			@Param("startTime") String startTime, @Param("endTime") String endTime);
+			@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("validState") Integer validState);
 
 	/**
-	 * 涓婄骇鏌ヨ
+	 * 涓婄骇鏌ヨ -鍚庡彴鏌ヨ
 	 * 
 	 * @param start
 	 * @param count
@@ -141,53 +106,58 @@
 
 	long countSuperiorQuery(@Param("state") Integer state, @Param("uid") Long uid);
 
+	
+	
 	/**
 	 * 鏌ヨ涓�绾ч槦鍛�
-	 * 
-	 * @param paramLong
-	 * @param paramInt
-	 * @param paramLong1
-	 * @return
-	 */
-	List<ThreeSale> listFirstTeam(@Param("start") long start, @Param("count") int count, 
-			@Param("uid") Long uid, @Param("state") Integer state);
-
-	/**
-	 * 缁熻涓�绾ч槦鍛�
-	 * 
-	 * @param uid
-	 * @param state
-	 * @return
-	 */
-	long countFirstTeam(@Param("uid") Long uid, @Param("state") Integer state);
-
-	/**
-	 * 鏌ヨ浜岀骇闃熷憳
-	 * 
 	 * @param start
 	 * @param count
 	 * @param uid
 	 * @return
 	 */
-	List<ThreeSale> listSecondTeam(@Param("start") long start, @Param("count") int count,
-			@Param("uid") Long uid,@Param("state") Integer state);
+	List<ThreeSale> listFirstTeam(@Param("start") long start, @Param("count") int count, @Param("uid") Long uid,
+			@Param("listId")List<Long> listId);
 
+	/**
+	 * 鏌ヨ浜岀骇闃熷憳
+	 * @param start
+	 * @param count
+	 * @param uid
+	 * @return
+	 */
+	List<ThreeSale> listSecondTeam(@Param("start") long start, @Param("count") int count, @Param("uid") Long uid,
+			@Param("listId")List<Long> listId);
+	
+	/**
+	 * 缁熻涓�绾ч槦鍛�
+	 * @param uid
+	 * @return
+	 */
+	long countFirstTeam(@Param("uid") Long uid, @Param("listId")List<Long> listId);
+	
 	/**
 	 * 缁熻浜岀骇闃熷憳
-	 * 
 	 * @param uid
-	 * @param state
 	 * @return
 	 */
-	long countSecondTeam(@Param("uid") Long uid, @Param("state") Integer state);
+	long countSecondTeam(@Param("uid") Long uid, @Param("listId")List<Long> listId);
 
+
+	
 	/**
-	 * 
+	 * 缁熻涓�绾ч槦鍛�
 	 * @param uid
 	 * @return
 	 */
-	ThreeSale getMyBoss(@Param("uid") Long uid);
-
+	long countFirstTeamByDate(@Param("uid") Long uid, @Param("dayType")int dayType);
+	
+	/**
+	 * 缁熻浜岀骇闃熷憳
+	 * @param uid
+	 * @return
+	 */
+	long countSecondTeamByDate(@Param("uid") Long uid, @Param("dayType")int dayType);
+	
 	/**
 	 * 鏍规嵁id銆乽id鏌ヨ
 	 * 
@@ -197,14 +167,6 @@
 	 */
 	List<ThreeSale> listbyIdAndBossId(@Param("id") Long id, @Param("uid") Long uid, @Param("expire") Integer expire);
 
-	/**
-	 * 鏍规嵁閭�璇疯�匢D鏌ヨ鍏崇郴
-	 * 
-	 * @param workerId
-	 * @return
-	 */
-	List<ThreeSale> listByWorkerId(Long workerId);
-	
 	
 	/**
 	 * 鑾峰彇鎴愬姛閭�璇峰叧绯绘暟閲�
@@ -232,23 +194,6 @@
 	 */
 	ThreeSale getNearRelationByBossIdAndWorkerId(@Param("bossId") Long bossId, @Param("workerId") Long workerId);
 	
-	
-	
-	/**
-	 * 鏍规嵁涓嬬骇鏌ヨ鎴愬姛鐨勯個璇峰叧绯�
-	 * @param workerId
-	 * @return
-	 */
-	ThreeSale selectSuccessByWorkerId(Long workerId);
-	
-
-	/**
-	 * 鏍规嵁閭�璇疯�匢D鏌ヨ鏈け鏁堝叧绯�
-	 * 
-	 * @param workerId
-	 * @return
-	 */
-	ThreeSale getByWorkerId(Long workerId);
 	
 	
 	/**
@@ -289,4 +234,14 @@
 	 * @return
 	 */
 	long getTeamOrderNumByWorkerId(@Param("workerId") Long workerId);
+	
+	/**
+	 * 鏈夋晥绮変笣uid
+	 * @param bossId
+	 * @param limitTime
+	 * @return
+	 */
+	List<ThreeSale> getValidWorkerIdsByTime(@Param("uid") Long uid,@Param("limitTime") long limitTime);
+	
+	
 }
\ No newline at end of file

--
Gitblit v1.8.0