From 30d8e227e8d823b6c38c3b9c90ac2df03b63befe Mon Sep 17 00:00:00 2001
From: admin <weikou2014>
Date: 星期二, 25 二月 2025 16:41:22 +0800
Subject: [PATCH] 淘宝转链接口更新

---
 fanli/src/main/java/com/yeshi/fanli/service/inter/user/invite/ThreeSaleSerivce.java |  633 ++++++++++++++++++++++++++++++--------------------------
 1 files changed, 337 insertions(+), 296 deletions(-)

diff --git a/fanli/src/main/java/com/yeshi/fanli/service/inter/user/invite/ThreeSaleSerivce.java b/fanli/src/main/java/com/yeshi/fanli/service/inter/user/invite/ThreeSaleSerivce.java
index de605f1..02cbb0b 100644
--- a/fanli/src/main/java/com/yeshi/fanli/service/inter/user/invite/ThreeSaleSerivce.java
+++ b/fanli/src/main/java/com/yeshi/fanli/service/inter/user/invite/ThreeSaleSerivce.java
@@ -1,296 +1,337 @@
-package com.yeshi.fanli.service.inter.user.invite;
-
-import java.util.List;
-
-import com.yeshi.fanli.entity.bus.user.ThreeSale;
-import com.yeshi.fanli.entity.bus.user.UserInfo;
-import com.yeshi.fanli.exception.user.ThreeSaleException;
-
-import net.sf.json.JSONObject;
-
-public interface ThreeSaleSerivce {
-
-	/**
-	 * 鑾峰彇璇ョ敤鎴蜂笂绾х敤鎴�
-	 * 
-	 * @param uid
-	 *            鐢ㄦ埛ID
-	 * @return
-	 */
-	UserInfo getBoss(long uid);
-
-	void bind(UserInfo worker, UserInfo boss) throws ThreeSaleException;
-
-	/**
-	 * 閭�璇峰叧绯荤敓鏁�
-	 * 
-	 * @param worker
-	 */
-	void effective(UserInfo worker);
-
-	/**
-	 * 涓�绾ф煡璇�
-	 * 
-	 * @param start
-	 * @param count
-	 * @param uid
-	 * @param startTime
-	 * @param endTime
-	 * @return
-	 */
-	public List<ThreeSale> listFirstTeamQuery(long start, int count, Long uid, Integer state, String startTime,
-			String endTime, Integer validState);
-
-	public long countFirstTeamQuery(Long uid, Integer state, String startTime, String endTime, Integer validState);
-
-	/**
-	 * 浜岀骇鏌ヨ
-	 * 
-	 * @param start
-	 * @param count
-	 * @param uid
-	 * @param startTime
-	 * @param endTime
-	 * @return
-	 */
-	public List<ThreeSale> listSecondTeamQuery(long start, int count, Long uid, Integer state, String startTime,
-			String endTime, Integer validState);
-
-	public long countSecondTeamQuery(Long uid, Integer state, String startTime, String endTime, Integer validState);
-
-	/**
-	 * 涓婄骇鏌ヨ
-	 * 
-	 * @param start
-	 * @param count
-	 * @param uid
-	 * @return
-	 */
-	public List<ThreeSale> listSuperiorQuery(long start, int count, Integer state, Long uid);
-
-	public long countSuperiorQuery(Integer state, Long uid);
-
-	/**
-	 * 鍓嶇鏌ヨ涓�绾ч槦鍛�
-	 * 
-	 * @param start
-	 * @param count
-	 * @param uid
-	 * @return
-	 */
-	public JSONObject getMyFirstTeam(long start, int count, Long uid);
-
-	/**
-	 * 鍓嶇鏌ヨ浜岀骇闃熷憳
-	 * 
-	 * @param start
-	 * @param count
-	 * @param uid
-	 * @return
-	 */
-	public JSONObject getMySecondTeam(long start, int count, Long uid);
-
-	/**
-	 * 鑾峰彇涓婄骇
-	 * 
-	 * @param uid
-	 * @return
-	 */
-	public ThreeSale getMyBoss(Long uid);
-
-	public ThreeSale selectByPrimaryKey(Long id);
-
-	/**
-	 * 鏌ヨ闃熷憳璁板綍 id+uid
-	 * 
-	 * @param id
-	 * @param uid
-	 * @param expire
-	 *            鏄惁澶辨晥鐘舵��
-	 * @return
-	 */
-	public List<ThreeSale> listbyIdAndBossId(Long id, Long uid, Integer expire);
-
-	/**
-	 * 鏍规嵁閭�璇疯�呮煡璇㈠叧绯�
-	 * 
-	 * @param workerId
-	 * @return
-	 */
-	public List<ThreeSale> listByWorkerId(Long workerId);
-
-	/**
-	 * 鑾峰彇鎴愬姛閭�璇峰叧绯绘暟閲�
-	 * 
-	 * @param uid
-	 * @return
-	 */
-	public int getSuccessRelationshipNum(Long uid);
-
-	/**
-	 * 鏍规嵁閭�璇疯�呮煡璇㈠叧绯�
-	 * 
-	 * @param workerId
-	 * @return
-	 */
-	public ThreeSale getByWorkerId(Long workerId);
-
-	/**
-	 * 寰俊婵�娲婚個璇烽槦鍛樺叧绯�
-	 * @param invitee
-	 * @param inviterId
-	 * @param threeSaleOld
-	 * @throws ThreeSaleException
-	 */
-	public void bindInviteRelationship(Long workerId, Long bossId) throws ThreeSaleException;
-
-	/**
-	* 鏍规嵁涓嬬骇鏌ユ壘瀵硅薄
-	 * @param workerId
-	 * @return
-	 */
-	public ThreeSale selectByWorkerId(Long workerId);
-
-	/**
-	 * 鏌ヨ鏈�杩戜竴鏉℃暟鎹紙鏍规嵁涓嬬骇鐢ㄦ埛ID涓庣姸鎬侊級
-	 * @param workerId
-	 * @param state
-	 * @return
-	 */
-	public ThreeSale selectLatestByWorkerIdAndState(Long workerId, int state);
-
-	/**
-	 * 鏃堕棿娈靛憿 閭�璇锋垚鍔熶俊鎭�
-	 * @param bossId
-	 * @param minTime
-	 * @param maxTime
-	 * @return
-	 */
-	public List<ThreeSale> getSuccessByDate(Long bossId, Long minTime, Long maxTime);
-
-	/**
-	 * 涓�绾ч槦鍛�
-	 * @param start
-	 * @param count
-	 * @param uid
-	 * @param state
-	 * @return
-	 */
-	public List<ThreeSale> listFirstTeam(long start, int count, Long uid);
-
-	/**
-	 * 浜岀骇闃熷憳
-	 * @param start
-	 * @param count
-	 * @param uid
-	 * @param state
-	 * @return
-	 */
-	public List<ThreeSale> listSecondTeam(long start, int count, Long uid);
-	
-	/**
-	 * 涓�绾ч槦鍛�
-	 * @param start
-	 * @param count
-	 * @param uid
-	 * @param state
-	 * @return
-	 */
-	public List<ThreeSale> listFirstTeam(long start, int count, Long uid, List<Long> listId);
-
-	/**
-	 * 浜岀骇闃熷憳
-	 * @param start
-	 * @param count
-	 * @param uid
-	 * @param state
-	 * @return
-	 */
-	public List<ThreeSale> listSecondTeam(long start, int count, Long uid, List<Long> listId);
-
-	/**
-	 * 缁熻鐩存帴绮変笣鏁伴噺
-	 * 
-	 * @param uid
-	 * @return
-	 */
-	public long countFirstTeam(Long uid);
-
-	/**
-	 * 缁熻闂存帴绮変笣鏁伴噺
-	 * @param uid
-	 * @return
-	 */
-	public long countSecondTeam(Long uid);
-
-	/**
-	 * 鏌ヨ閭�璇峰叧绯� 鏃堕棿绛涢��
-	 * @param workerId 涓嬬骇id
-	 * @param time
-	 * @return
-	 */
-	public ThreeSale getByWorkerIdAndTime(Long workerId, long time);
-
-	/**
-	 * 閭�璇峰叧绯昏劚绂�
-	 * @param workerId
-	 * @param bossId
-	 */
-	public void inviteSeparate(Long workerId, Long bossId);
-
-	/*
-	 * 璇ラ槦鍛� 鍦ㄩ槦涓帓绗嚑
-	 */
-	public long getTeamOrderNumByWorkerId(Long workerId);
-
-	/**
-	 * 鏌ヨ鏈�杩戝叧绯� - 鏈夋晥鍒欎紭鍏�
-	 * @param bossId
-	 * @param workerId
-	 * @return
-	 */
-	public ThreeSale getNearRelationByBossIdAndWorkerId(Long bossId, Long workerId);
-
-	/**
-	 * 鏍规嵁鏃堕棿绛涢�夊嚭鏈夋晥绮変笣
-	 * @param bossId
-	 * @param limitTime
-	 * @return
-	 */
-	public List<ThreeSale> getValidWorkerIdsByTime(Long bossId, long limitTime);
-
-	/**
-	 * 鑾峰彇涓婂嚑绾ч個璇蜂汉
-	 * @Title: getMyBossDeepList
-	 * @Description: 
-	 * @param uid
-	 * @param deep 涓奷eep绾�
-	 * @return 
-	 * List<ThreeSale> 杩斿洖绫诲瀷
-	 * @throws
-	 */
-	public List<ThreeSale> getMyBossDeepList(Long uid, int deep);
-
-	/**
-	 * 鑾峰彇涓婄骇鍒楄〃
-	 * @Title: getMyBossDeepList
-	 * @Description: 
-	 * @param uid
-	 * @return 
-	 * List<ThreeSale> 杩斿洖绫诲瀷
-	 * @throws
-	 */
-	public List<ThreeSale> getMyBossDeepList(Long uid);
-
-	/**
-	 * 鑾峰彇鐢ㄦ埛鐨勯《绾oss
-	 * @Title: getTopBoss
-	 * @Description: 
-	 * @param uid
-	 * @return 
-	 * Long 杩斿洖绫诲瀷
-	 * @throws
-	 */
-	public Long getTopBoss(Long uid);
-
-}
+package com.yeshi.fanli.service.inter.user.invite;
+
+import java.util.Date;
+import java.util.List;
+
+import com.yeshi.fanli.entity.bus.user.ThreeSale;
+import com.yeshi.fanli.entity.bus.user.UserInfo;
+import com.yeshi.fanli.exception.user.ThreeSaleException;
+
+import net.sf.json.JSONObject;
+
+public interface ThreeSaleSerivce {
+
+	/**
+	 * 鑾峰彇璇ョ敤鎴蜂笂绾х敤鎴�
+	 * 
+	 * @param uid
+	 *            鐢ㄦ埛ID
+	 * @return
+	 */
+	UserInfo getBoss(long uid);
+
+	void bind(UserInfo worker, UserInfo boss) throws ThreeSaleException;
+
+	/**
+	 * 閭�璇峰叧绯荤敓鏁�
+	 * 
+	 * @param worker
+	 */
+	void effective(UserInfo worker);
+
+	/**
+	 * 涓�绾ф煡璇�
+	 * 
+	 * @param start
+	 * @param count
+	 * @param uid
+	 * @param startTime
+	 * @param endTime
+	 * @return
+	 */
+	public List<ThreeSale> listFirstTeamQuery(long start, int count, Long uid, Integer state, String startTime,
+			String endTime, Integer validState);
+
+	public long countFirstTeamQuery(Long uid, Integer state, String startTime, String endTime, Integer validState);
+
+	/**
+	 * 浜岀骇鏌ヨ
+	 * 
+	 * @param start
+	 * @param count
+	 * @param uid
+	 * @param startTime
+	 * @param endTime
+	 * @return
+	 */
+	public List<ThreeSale> listSecondTeamQuery(long start, int count, Long uid, Integer state, String startTime,
+			String endTime, Integer validState);
+
+	public long countSecondTeamQuery(Long uid, Integer state, String startTime, String endTime, Integer validState);
+
+	/**
+	 * 涓婄骇鏌ヨ
+	 * 
+	 * @param start
+	 * @param count
+	 * @param uid
+	 * @return
+	 */
+	public List<ThreeSale> listSuperiorQuery(long start, int count, Integer state, Long uid);
+
+	public long countSuperiorQuery(Integer state, Long uid);
+
+	/**
+	 * 鍓嶇鏌ヨ涓�绾ч槦鍛�
+	 * 
+	 * @param start
+	 * @param count
+	 * @param uid
+	 * @return
+	 */
+	public JSONObject getMyFirstTeam(long start, int count, Long uid);
+
+	/**
+	 * 鍓嶇鏌ヨ浜岀骇闃熷憳
+	 * 
+	 * @param start
+	 * @param count
+	 * @param uid
+	 * @return
+	 */
+	public JSONObject getMySecondTeam(long start, int count, Long uid);
+
+	/**
+	 * 鑾峰彇涓婄骇
+	 * 
+	 * @param uid
+	 * @return
+	 */
+	public ThreeSale getMyBoss(Long uid);
+
+	public ThreeSale selectByPrimaryKey(Long id);
+
+	/**
+	 * 鏌ヨ闃熷憳璁板綍 id+uid
+	 * 
+	 * @param id
+	 * @param uid
+	 * @param expire
+	 *            鏄惁澶辨晥鐘舵��
+	 * @return
+	 */
+	public List<ThreeSale> listbyIdAndBossId(Long id, Long uid, Integer expire);
+
+	/**
+	 * 鏍规嵁閭�璇疯�呮煡璇㈠叧绯�
+	 * 
+	 * @param workerId
+	 * @return
+	 */
+	public List<ThreeSale> listByWorkerId(Long workerId);
+
+	/**
+	 * 鑾峰彇鎴愬姛閭�璇峰叧绯绘暟閲�
+	 * 
+	 * @param uid
+	 * @return
+	 */
+	public int getSuccessRelationshipNum(Long uid);
+
+	/**
+	 * 鏍规嵁閭�璇疯�呮煡璇㈠叧绯�
+	 * 
+	 * @param workerId
+	 * @return
+	 */
+	public ThreeSale getByWorkerId(Long workerId);
+
+	/**
+	 * 寰俊婵�娲婚個璇烽槦鍛樺叧绯�
+	 * @param invitee
+	 * @param inviterId
+	 * @param threeSaleOld
+	 * @throws ThreeSaleException
+	 */
+	public void bindInviteRelationship(Long workerId, Long bossId) throws ThreeSaleException;
+
+	/**
+	* 鏍规嵁涓嬬骇鏌ユ壘瀵硅薄
+	 * @param workerId
+	 * @return
+	 */
+	public ThreeSale selectByWorkerId(Long workerId);
+
+	/**
+	 * 鏌ヨ鏈�杩戜竴鏉℃暟鎹紙鏍规嵁涓嬬骇鐢ㄦ埛ID涓庣姸鎬侊級
+	 * @param workerId
+	 * @param state
+	 * @return
+	 */
+	public ThreeSale selectLatestByWorkerIdAndState(Long workerId, int state);
+
+	/**
+	 * 鏃堕棿娈靛憿 閭�璇锋垚鍔熶俊鎭�
+	 * @param bossId
+	 * @param minTime
+	 * @param maxTime
+	 * @return
+	 */
+	public List<ThreeSale> getSuccessByDate(Long bossId, Long minTime, Long maxTime);
+
+	/**
+	 * 涓�绾ч槦鍛�
+	 * @param start
+	 * @param count
+	 * @param uid
+	 * @param state
+	 * @return
+	 */
+	public List<ThreeSale> listFirstTeam(long start, int count, Long uid);
+
+	/**
+	 * 浜岀骇闃熷憳
+	 * @param start
+	 * @param count
+	 * @param uid
+	 * @param state
+	 * @return
+	 */
+	public List<ThreeSale> listSecondTeam(long start, int count, Long uid);
+	
+	/**
+	 * 涓�绾ч槦鍛�
+	 * @param start
+	 * @param count
+	 * @param uid
+	 * @param state
+	 * @return
+	 */
+	public List<ThreeSale> listFirstTeam(long start, int count, Long uid, List<Long> listId);
+
+	/**
+	 * 浜岀骇闃熷憳
+	 * @param start
+	 * @param count
+	 * @param uid
+	 * @param state
+	 * @return
+	 */
+	public List<ThreeSale> listSecondTeam(long start, int count, Long uid, List<Long> listId);
+
+	public long countFirstTeam(Long uid);
+
+	public long countSecondTeam(Long uid);
+	
+	/**
+	 * 缁熻鐩存帴绮変笣鏁伴噺
+	 * 
+	 * @param uid
+	 * @return
+	 */
+	public long countFirstTeam(Long uid, List<Long> listId);
+
+	/**
+	 * 缁熻闂存帴绮変笣鏁伴噺
+	 * @param uid
+	 * @return
+	 */
+	public long countSecondTeam(Long uid, List<Long> listId);
+
+	/**
+	 * 鏌ヨ閭�璇峰叧绯� 鏃堕棿绛涢��
+	 * @param workerId 涓嬬骇id
+	 * @param time
+	 * @return
+	 */
+	public ThreeSale getByWorkerIdAndTime(Long workerId, long time);
+
+	/**
+	 * 閭�璇峰叧绯昏劚绂�
+	 * @param workerId
+	 * @param bossId
+	 */
+	public void inviteSeparate(Long workerId, Long bossId);
+
+	/*
+	 * 璇ラ槦鍛� 鍦ㄩ槦涓帓绗嚑
+	 */
+	public long getTeamOrderNumByWorkerId(Long workerId);
+
+	/**
+	 * 鏌ヨ鏈�杩戝叧绯� - 鏈夋晥鍒欎紭鍏�
+	 * @param bossId
+	 * @param workerId
+	 * @return
+	 */
+	public ThreeSale getNearRelationByBossIdAndWorkerId(Long bossId, Long workerId);
+
+	/**
+	 * 鏍规嵁鏃堕棿绛涢�夊嚭鏈夋晥绮変笣
+	 * @param bossId
+	 * @param limitTime
+	 * @return
+	 */
+	public List<ThreeSale> getValidWorkerIdsByTime(Long bossId, long limitTime);
+
+	/**
+	 * 鑾峰彇涓婂嚑绾ч個璇蜂汉
+	 * @Title: getMyBossDeepList
+	 * @Description: 
+	 * @param uid
+	 * @param deep 涓奷eep绾�
+	 * @return 
+	 * List<ThreeSale> 杩斿洖绫诲瀷
+	 * @throws
+	 */
+	public List<ThreeSale> getMyBossDeepList(Long uid, int deep);
+
+	/**
+	 * 鑾峰彇涓婄骇鍒楄〃
+	 * @Title: getMyBossDeepList
+	 * @Description: 
+	 * @param uid
+	 * @return 
+	 * List<ThreeSale> 杩斿洖绫诲瀷
+	 * @throws
+	 */
+	public List<ThreeSale> getMyBossDeepList(Long uid);
+
+	/**
+	 * 鑾峰彇鐢ㄦ埛鐨勯《绾oss
+	 * @Title: getTopBoss
+	 * @Description: 
+	 * @param uid
+	 * @return 
+	 * Long 杩斿洖绫诲瀷
+	 * @throws
+	 */
+	public Long getTopBoss(Long uid);
+	
+	
+	/**
+	 * 鏌ヨ鍒楄〃
+	 * @Title: list
+	 * @Description: 
+	 * @param page
+	 * @param pageSize
+	 * @return 
+	 * List<ThreeSale> 杩斿洖绫诲瀷
+	 * @throws
+	 */
+	public List<ThreeSale> listAll(Date minTime,Date maxTime, int page,int pageSize);
+	
+	public long countAll(Date minTime,Date maxTime);
+
+	/**
+	 * 鏍规棩鏈熺被鍨嬭繘琛岀粺璁$洿鎺�
+	 */
+	public long countFirstTeamByDate(Long uid, int dayType);
+
+	/**
+	 *  鏍规棩鏈熺被鍨嬭繘琛岀粺璁¢棿鎺�
+	 * @param uid
+	 * @param dayType
+	 * @return
+	 */
+	public long countSecondTeamByDate(Long uid, int dayType);
+
+	
+	/**
+	 * 鏌ヨboosID
+	 * @return
+	 */
+	public List<Long> getAllBossId();
+
+
+}

--
Gitblit v1.8.0