From b803abf95ed0cc721f8f9e767283e5ac6b8ca090 Mon Sep 17 00:00:00 2001
From: yujian <yujian@163.com>
Date: 星期六, 18 四月 2020 11:52:17 +0800
Subject: [PATCH] 活跃消息
---
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/ThreeSaleMapper.java | 564 ++++++++++++++++++++++++++++++++------------------------
1 files changed, 324 insertions(+), 240 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 c2d5255..51adb14 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
@@ -1,241 +1,325 @@
-package com.yeshi.fanli.dao.mybatis;
-
-import java.util.List;
-
-import org.apache.ibatis.annotations.Param;
-
-import com.yeshi.fanli.entity.bus.user.ThreeSale;
-import com.yeshi.fanli.entity.bus.user.UserInfo;
-
-public interface ThreeSaleMapper {
-
- int deleteByPrimaryKey(Long id);
-
- int insert(ThreeSale record);
-
- int insertSelective(ThreeSale record);
-
- ThreeSale selectByPrimaryKey(Long id);
-
- UserInfo selectBoss(Long uid);
-
- List<ThreeSale> selectByUid(Long uid);
-
- int updateByPrimaryKeySelective(ThreeSale record);
-
- int updateByPrimaryKey(ThreeSale record);
-
- int effectThreeSale(Long workerUid);
-
- /**
- * 鍒犻櫎澶辨晥
- * @param bossId
- * @param workerId
- * @return
- */
- int deleteExpireRecord(@Param("bossId")Long bossId, @Param("workerId")Long workerId);
-
- /**
- * 澶辨晥
- * @param bossId
- * @param workerId
- * @return
- */
- List<ThreeSale> getExpireRecord(@Param("bossId")Long bossId, @Param("workerId")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
- * @param key
- * @param startTime
- * @param endTime
- * @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);
-
- long countFirstTeamQuery(@Param("uid") Long uid, @Param("state") Integer state,
- @Param("startTime") String startTime, @Param("endTime") String endTime);
-
- /**
- * 浜岀骇鏌ヨ
- *
- * @param start
- * @param count
- * @param key
- * @param startTime
- * @param endTime
- * @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);
-
- long countSecondTeamQuery(@Param("uid") Long uid, @Param("state") Integer state,
- @Param("startTime") String startTime, @Param("endTime") String endTime);
-
- /**
- * 涓婄骇鏌ヨ
- *
- * @param start
- * @param count
- * @param uid
- * @return
- */
- List<ThreeSale> listSuperiorQuery(@Param("start") long start, @Param("count") int count,
- @Param("state") Integer state, @Param("uid") Long uid);
-
- 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);
-
- /**
- * 缁熻浜岀骇闃熷憳
- *
- * @param uid
- * @param state
- * @return
- */
- long countSecondTeam(@Param("uid") Long uid, @Param("state") Integer state);
-
- /**
- *
- * @param uid
- * @return
- */
- ThreeSale getMyBoss(@Param("uid") Long uid);
-
- /**
- * 鏍规嵁id銆乽id鏌ヨ
- *
- * @param id
- * @param uid
- * @return
- */
- List<ThreeSale> listbyIdAndBossId(@Param("id") Long id, @Param("uid") Long uid, @Param("expire") Integer expire);
-
- /**
- * 鏍规嵁閭�璇疯�匢D鏌ヨ鍏崇郴
- *
- * @param workerId
- * @return
- */
- List<ThreeSale> listByWorkerId(Long workerId);
-
-
- /**
- * 鑾峰彇鎴愬姛閭�璇峰叧绯绘暟閲�
- *
- * @param uid
- * @return
- */
- int getSuccessRelationshipNum(@Param("uid") Long uid);
-
-
- /**
- * 鏍规嵁閭�璇疯�匢D銆乥ossID鏌ヨ 鏈夋晥鍏崇郴
- *
- * @param workerId
- * @return
- */
- ThreeSale getRelationshipByBossIdAndWorkerId(@Param("bossId") Long bossId, @Param("workerId") Long workerId);
-
- /**
- * 鏍规嵁涓嬬骇鏌ヨ鎴愬姛鐨勯個璇峰叧绯�
- * @param workerId
- * @return
- */
- ThreeSale selectSuccessByWorkerId(Long workerId);
-
-
- /**
- * 鏍规嵁閭�璇疯�匢D鏌ヨ鏈け鏁堝叧绯�
- *
- * @param workerId
- * @return
- */
- ThreeSale getByWorkerId(Long workerId);
+package com.yeshi.fanli.dao.mybatis;
+
+import java.util.List;
+
+import org.apache.ibatis.annotations.Param;
+
+import com.yeshi.fanli.entity.bus.user.ThreeSale;
+import com.yeshi.fanli.entity.bus.user.UserInfo;
+
+public interface ThreeSaleMapper {
+
+ int deleteByPrimaryKey(Long id);
+
+ int insert(ThreeSale record);
+
+ int insertSelective(ThreeSale record);
+
+ ThreeSale selectByPrimaryKey(Long id);
+
+ UserInfo selectBoss(Long uid);
+
+ List<ThreeSale> selectByUid(Long uid);
+
+ int updateByPrimaryKeySelective(ThreeSale record);
+
+ int updateByPrimaryKey(ThreeSale record);
+
+ int effectThreeSale(Long workerUid);
+
+ /**
+ * 鍒犻櫎澶辨晥
+ * @param bossId
+ * @param workerId
+ * @return
+ */
+ int deleteExpireRecord(@Param("bossId")Long bossId, @Param("workerId")Long workerId);
+
+ /**
+ * 澶辨晥
+ * @param bossId
+ * @param workerId
+ * @return
+ */
+ List<ThreeSale> getExpireRecord(@Param("bossId")Long bossId, @Param("workerId")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 start
+ * @param count
+ * @param key
+ * @param startTime
+ * @param endTime
+ * @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);
+
+ long countFirstTeamQuery(@Param("uid") Long uid, @Param("state") Integer state,
+ @Param("startTime") String startTime, @Param("endTime") String endTime);
+
+ /**
+ * 浜岀骇鏌ヨ
+ *
+ * @param start
+ * @param count
+ * @param key
+ * @param startTime
+ * @param endTime
+ * @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);
+
+ long countSecondTeamQuery(@Param("uid") Long uid, @Param("state") Integer state,
+ @Param("startTime") String startTime, @Param("endTime") String endTime);
+
+ /**
+ * 涓婄骇鏌ヨ
+ *
+ * @param start
+ * @param count
+ * @param uid
+ * @return
+ */
+ List<ThreeSale> listSuperiorQuery(@Param("start") long start, @Param("count") int count,
+ @Param("state") Integer state, @Param("uid") Long uid);
+
+ 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 paramLong
+ * @param paramInt
+ * @param paramLong1
+ * @return
+ */
+ List<ThreeSale> listFirstTeamByUndeleted(@Param("start") long start, @Param("count") int count, @Param("uid") Long uid);
+
+ /**
+ * 缁熻涓�绾ч槦鍛� -鏈垹闄ょ増
+ *
+ * @param uid
+ * @param state
+ * @return
+ */
+ long countFirstTeamByUndeleted(@Param("uid") Long uid);
+
+
+
+ /**
+ * 鏌ヨ浜岀骇闃熷憳
+ *
+ * @param start
+ * @param count
+ * @param uid
+ * @return
+ */
+ List<ThreeSale> listSecondTeamByUndeleted(@Param("start") long start, @Param("count") int count,
+ @Param("uid") Long uid);
+
+ /**
+ * 缁熻浜岀骇闃熷憳
+ *
+ * @param uid
+ * @param state
+ * @return
+ */
+ long countSecondTeamByUndeleted(@Param("uid") Long uid);
+
+
+
+
+ /**
+ * 鏌ヨ浜岀骇闃熷憳
+ *
+ * @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);
+
+ /**
+ * 缁熻浜岀骇闃熷憳
+ *
+ * @param uid
+ * @param state
+ * @return
+ */
+ long countSecondTeam(@Param("uid") Long uid, @Param("state") Integer state);
+
+ /**
+ *
+ * @param uid
+ * @return
+ */
+ ThreeSale getMyBoss(@Param("uid") Long uid);
+
+ /**
+ * 鏍规嵁id銆乽id鏌ヨ
+ *
+ * @param id
+ * @param uid
+ * @return
+ */
+ List<ThreeSale> listbyIdAndBossId(@Param("id") Long id, @Param("uid") Long uid, @Param("expire") Integer expire);
+
+ /**
+ * 鏍规嵁閭�璇疯�匢D鏌ヨ鍏崇郴
+ *
+ * @param workerId
+ * @return
+ */
+ List<ThreeSale> listByWorkerId(Long workerId);
+
+
+ /**
+ * 鑾峰彇鎴愬姛閭�璇峰叧绯绘暟閲�
+ *
+ * @param uid
+ * @return
+ */
+ int getSuccessRelationshipNum(@Param("uid") Long uid);
+
+
+ /**
+ * 鏍规嵁閭�璇疯�匢D銆乥ossID鏌ヨ 鏈夋晥鍏崇郴
+ *
+ * @param workerId
+ * @return
+ */
+ ThreeSale getRelationshipByBossIdAndWorkerId(@Param("bossId") Long bossId, @Param("workerId") Long workerId);
+
+
+ /**
+ * 鏈�鍚庝竴娆″叧绯昏褰� -鏃犺
+ * @param bossId
+ * @param workerId
+ * @return
+ */
+ 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);
+
+
+ /**
+ * 鏌ヨ鏃堕棿娈甸個璇锋垚鍔熶汉淇℃伅
+ * @param bossId
+ * @param minTime
+ * @param maxTime
+ * @return
+ */
+ List<ThreeSale> getSuccessByDate(@Param("bossId")Long bossId,@Param("minTime")Long minTime, @Param("maxTime")Long maxTime);
+
+ /**
+ * 鏌ヨ鏈�杩戠殑淇℃伅锛堟牴鎹笅绾D涓庣姸鎬侊級
+ * @param workerId
+ * @param state
+ * @return
+ */
+ ThreeSale selectLatestByWorkerIdAndState(@Param("workerId") Long workerId,@Param("state") int state);
+
+ /**
+ * 鏍规嵁鏃堕棿鏌ヨ閭�璇峰叧绯�
+ * @param uid
+ * @param time
+ * @return
+ */
+ ThreeSale getByWorkerIdAndTime(@Param("workerId") Long workerId, @Param("time") long time);
+
+ /**
+ * 閭�璇峰叧绯昏劚绂�
+ * @param bossId
+ * @param workerId
+ */
+ void inviteSeparate(@Param("workerId") Long workerId, @Param("bossId")Long bossId);
+
+ /**
+ * 闃熷憳鍦ㄨboss 涓嬬鍑犱釜闃熷憳搴忓彿
+ * @param workerId
+ * @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