admin
2020-05-19 744594ef1a2f530fc3e86ea9dc48b62247f79420
fanli/src/main/java/com/yeshi/fanli/service/inter/user/invite/ThreeSaleSerivce.java
@@ -1,5 +1,6 @@
package com.yeshi.fanli.service.inter.user.invite;
import java.util.Date;
import java.util.List;
import com.yeshi.fanli.entity.bus.user.ThreeSale;
@@ -28,70 +29,6 @@
    */
   void effective(UserInfo worker);
   // 获取一级用户数量
   long getFirstUsersCount(Long uid);
   // 获取二级用户数量
   long getSecondUsersCount(Long uid);
   /**
    * 查询一度队员集合
    *
    * @param start
    * @param count
    * @param key
    * @param uid
    * @return
    */
   public List<ThreeSale> queryMyFirstTeamList(int start, int count, String key, Long bossId);
   public long queryCountMyFirstTeamList(String key, Long bossId);
   /**
    * 查询二度队员集合
    *
    * @param start
    * @param count
    * @param key
    * @param uid
    * @return
    */
   public List<ThreeSale> queryMySecondTeamList(int start, int count, String key, Long bossId);
   public long queryCountMySecondTeamList(String key, Long bossId);
   /**
    * 删除邀请关系id
    *
    * @param id
    * @return
    */
   public int deleteByPrimaryKey(Long id);
   /**
    * 长时间未邀请成功用户
    *
    * @param daysNum
    * @return
    */
   public List<Long> queryLongTimeFailed(int daysNum);
   /**
    * 长时间 邀请成功用户
    *
    * @param daysNum
    * @return
    */
   public List<ThreeSale> queryLongTimeSuccess(int daysNum);
   /**
    * 设置对应邀请过期
    *
    * @param list
    * @return
    */
   public int updateExpire(List<Long> list);
   /**
    * 一级查询
    * 
@@ -103,9 +40,9 @@
    * @return
    */
   public List<ThreeSale> listFirstTeamQuery(long start, int count, Long uid, Integer state, String startTime,
         String endTime);
         String endTime, Integer validState);
   public long countFirstTeamQuery(Long uid, Integer state, String startTime, String endTime);
   public long countFirstTeamQuery(Long uid, Integer state, String startTime, String endTime, Integer validState);
   /**
    * 二级查询
@@ -118,9 +55,9 @@
    * @return
    */
   public List<ThreeSale> listSecondTeamQuery(long start, int count, Long uid, Integer state, String startTime,
         String endTime);
         String endTime, Integer validState);
   public long countSecondTeamQuery(Long uid, Integer state, String startTime, String endTime);
   public long countSecondTeamQuery(Long uid, Integer state, String startTime, String endTime, Integer validState);
   /**
    * 上级查询
@@ -134,27 +71,6 @@
   public long countSuperiorQuery(Integer state, Long uid);
   /**
    * 统计所有一级队员
    *
    * @param uid
    * @param state
    *            状态,值 为空时则统计所有
    * @return
    */
   public long countFirstTeam(Long uid, Integer state);
   /**
    * 统计二级队员
    *
    * @param uid
    * @param state
    *            状态,值 为空时则统计所有
    * @return
    */
   public long countSecondTeam(Long uid, Integer state);
   /**
    * 前端查询一级队员
    * 
@@ -163,7 +79,7 @@
    * @param uid
    * @return
    */
   public JSONObject getMyFirstTeam(long start, int count, Long uid, Integer state);
   public JSONObject getMyFirstTeam(long start, int count, Long uid);
   /**
    * 前端查询二级队员
@@ -173,7 +89,7 @@
    * @param uid
    * @return
    */
   public JSONObject getMySecondTeam(long start, int count, Long uid, Integer state);
   public JSONObject getMySecondTeam(long start, int count, Long uid);
   /**
    * 获取上级
@@ -213,23 +129,6 @@
   public int getSuccessRelationshipNum(Long uid);
   /**
    * 邀请码生成上下级关系
    *
    * @param invitee
    * @param inviter
    * @throws ThreeSaleException
    */
   public void bindRelationshipByInviteCode(UserInfo invitee, UserInfo inviter) throws ThreeSaleException;
   /**
    * 统计邀请成功队员数量
    *
    * @param uid
    * @return
    */
   public long countSuccessFirstTeam(Long uid);
   /**
    * 根据邀请者查询关系
    * 
    * @param workerId
@@ -244,23 +143,22 @@
    * @param threeSaleOld
    * @throws ThreeSaleException
    */
   public void bindRelationshipByWX(UserInfo invitee, Long inviterId) 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);
   public ThreeSale selectLatestByWorkerIdAndState(Long workerId, int state);
   /**
    * 时间段呢 邀请成功信息
@@ -279,7 +177,7 @@
    * @param state
    * @return
    */
   public List<ThreeSale> listFirstTeam(long start, int count, Long uid, Integer state);
   public List<ThreeSale> listFirstTeam(long start, int count, Long uid);
   /**
    * 二级队员
@@ -289,7 +187,46 @@
    * @param state
    * @return
    */
   public List<ThreeSale> listSecondTeam(long start, int count, Long uid, Integer state);
   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);
   /**
    * 查询邀请关系 时间筛选
@@ -306,7 +243,6 @@
    */
   public void inviteSeparate(Long workerId, Long bossId);
   /*
    * 该队员 在队中排第几
    */
@@ -327,8 +263,7 @@
    * @return
    */
   public List<ThreeSale> getValidWorkerIdsByTime(Long bossId, long limitTime);
   /**
    * 获取上几级邀请人
    * @Title: getMyBossDeepList
@@ -339,38 +274,64 @@
    * List<ThreeSale> 返回类型
    * @throws
    */
   public List<ThreeSale> getMyBossDeepList(Long uid,int deep);
   public List<ThreeSale> getMyBossDeepList(Long uid, int deep);
   /**
    * 查询未删除版-粉丝一级
    * @param start
    * @param count
    * 获取上级列表
    * @Title: getMyBossDeepList
    * @Description:
    * @param uid
    * @return
    * @return
    * List<ThreeSale> 返回类型
    * @throws
    */
   public List<ThreeSale> listFirstTeamByUndeleted(long start, int count, Long uid);
   public List<ThreeSale> getMyBossDeepList(Long uid);
   /**
    * 统计粉丝一级
    * 获取用户的顶级boss
    * @Title: getTopBoss
    * @Description:
    * @param uid
    * @return
    * @return
    * Long 返回类型
    * @throws
    */
   public long countFirstTeamByUndeleted(Long uid);
   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);
   /**
    * 查询未删除版-粉丝二级
    * @param start
    * @param count
    * @param uid
    * @return
    * 根日期类型进行统计直接
    */
   public List<ThreeSale> listSecondTeamByUndeleted(long start, int count, Long uid);
   public long countFirstTeamByDate(Long uid, int dayType);
   /**
    * 统计粉丝二级
    *  根日期类型进行统计间接
    * @param uid
    * @param dayType
    * @return
    */
   public long countSecondTeamByUndeleted(Long uid);
   public long countSecondTeamByDate(Long uid, int dayType);
   /**
    * 查询boosID
    * @return
    */
   public List<Long> getAllBossId();
}