喻健
2018-11-16 242bfb8d36bb183a5cf519274a15a87e2fc45971
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
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 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);
    
}