Administrator
2018-11-20 6b1193b5288c02d0553b353d3043a89066a9dbba
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
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
package com.yeshi.fanli.service.inter.hongbao;
 
import java.util.List;
 
import com.yeshi.fanli.entity.bus.user.ThreeSale;
import com.yeshi.fanli.entity.bus.user.UserInfo;
 
public interface ThreeSaleSerivce {
 
    /**
     * 获取该用户上级用户
     * 
     * @param uid
     *            用户ID
     * @return
     */
    UserInfo getBoss(long uid);
 
    int findInviteCount(long id);
 
    void bind(UserInfo invitee, UserInfo inviter);
 
    void effective(UserInfo find);
 
    void validateTwentyFour();
 
    /**
     * 重新计算用户的等级
     * 
     * @param uid
     */
    void reComputeUserRank(Long uid);
 
    void validate365();
 
    // 获取下级用户
    List<UserInfo> getFirstUsers(Long uid, int page);
 
    // 获取一级用户数量
    long getFirstUsersCount(Long uid);
 
    // 获取下2级用户
    List<UserInfo> getSecondUsers(Long uid, int page);
 
    // 获取二级用户数量
    long getSecondUsersCount(Long uid);
 
    // 获取最近有效的分销列表
    List<ThreeSale> getLastestThreeSaleList(int i, String key);
 
    //邀请关系
    int getLastestThreeSaleCount(String key);
 
 
    /**
     * 查询一度队员集合
     * @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);
 
     /**
     * 一级查询
     * @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);
        
    public long countFirstTeamQuery(Long uid, Integer state, String startTime, String endTime);
 
      /**
     * 二级查询
     * @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);
    
    public long countSecondTeamQuery(Long uid, Integer state, String startTime, String endTime);
    
    
      /**
     * 上级查询
     * @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);
    
}