yujian
2020-01-17 bf0a347104579e5f7a2ed6e660ebb9f17f76ffc0
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
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
package com.yeshi.fanli.service.inter.count;
 
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
 
import com.yeshi.fanli.dto.ChartTDO;
import com.yeshi.fanli.entity.admin.count.CountOrderInfo;
import com.yeshi.fanli.entity.admin.count.CountUserInfo;
import com.yeshi.fanli.vo.user.UserGoldCoinVO;
 
 
 
public interface UserInfoCountService {
    
 
    /**
     * 统计用户个数
     * @param isToday  统计今日
     * @param isMonth  统计当月  二则不可同时存在
     * @return
     */
    public long countNewUser(Integer isToday, Integer isMonth);
 
    /**
     * 根据等级统计用户数量
     * @param rank
     * @return
     */
    public long countRank(Integer rank);
 
    /**
     * 统计所有用户总金额  或  可提现金额
     * @param minMoney
     * @return
     */
    public BigDecimal countAllMoney(Double minMoney);
 
    /**
     * 统计流失用户数量:( num 天未使用登录并且无任何资金流动的账号数量)
     * @param num 180
     * @return
     */
    public long countLoseUser(int daysNum);
    
    /**
     * 累计有购买用户数
     * @return
     */
    public long countHasOrderUser();
 
 
    /**
     * 统计新增用户
     * @return
     */
    public List<ChartTDO> countNewUserByDate(String channel,Integer type,String years, String startTime, String endTime) throws Exception;
 
    
    
    public List<ChartTDO> getTodayBuyRate(String channel, Integer type, String years, String startTime,
            String endTime) throws Exception;
 
    
    public List<Object>  getWeekBuyRate(String channel, String startTime, String endTime,
            Integer orderNum, List<String> dateList) throws Exception;
    
    
    /**
     * 统计用户金币情况
     * @param start
     * @param count
     * @return
     */
    public List<UserGoldCoinVO> listByUserGoldCoin(long start, int count, int type, String key);
 
    public long countByUserGoldCoin(int type, String key);
 
    /**
     * 统计剩余金币
     * @param start
     * @param count
     * @return
     */
    public List<UserGoldCoinVO> listByHasGoldCoin(long start, int count, String key);
 
    public long countByHasGoldCoin(String key);
 
    public List<CountUserInfo> getNewUserData(Date startTime, Date endTime, String channel);
 
    public void initChannelUserCount();
 
    
    /**
     * 新用户查询24内下单数量 -有效数量
     * @param channel
     * @param startTime
     * @param endTime
     * @return
     */
    public List<CountOrderInfo> count24HOderByChannel(String channel, Date startTime, Date endTime);
 
    /**
     * 新用户当日下单数量 -有效
     * @param channel
     * @param startTime
     * @param endTime
     * @return
     */
    public List<CountUserInfo> countUserDownOrderByChannelAndToday(String channel, Date startTime, Date endTime);
 
    /**
     * 新用户7天内下单数量- 有效
     * @param channel
     * @param startTime
     * @param endTime
     * @return
     */
    public List<CountUserInfo> countUseByChannelAndWeekOrder(String channel, Date startTime, Date endTime);
    
    /**
     * 新用户7天内下3单数量- 有效
     * @param channel
     * @param startTime
     * @param endTime
     * @return
     */
    public List<CountUserInfo> countUseByChannelAndWeekThreeOrder(String channel, Date startTime, Date endTime);
 
    /**
     * 初始化用户7天订单统计
     */
    public void initCountUserWeekOrder();
 
    /**
     * 统计订单总数量 -分渠道 有效的
     * @param channel
     * @param startTime
     * @param endTime
     * @return
     */
    public List<CountOrderInfo> countOderByChannel(String channel, Date startTime, Date endTime);
 
    /**
     * 统计订单佣金
     * @param channel
     * @param startTime
     * @param endTime
     * @return
     */
    public List<CountOrderInfo> countHongBaoByChannel(String channel, Date startTime, Date endTime);
 
    /**
     * 统计订单数量-根据类型
     * @param channel
     * @param startTime
     * @param endTime
     * @return
     */
    public List<CountOrderInfo> countOrderType(Integer state, Date startTime, Date endTime);
 
    
    /**
     * 统计维权订单数量
     * @param state
     * @param startTime
     * @param endTime
     * @return
     */
    public List<CountOrderInfo> countWeiQuanOrder(Date startTime, Date endTime);
 
    /**
     * 统计维权金额
     * @param state
     * @param startTime
     * @param endTime
     * @return
     */
    public List<CountOrderInfo> countWeiQuanOrderMoney(Date startTime, Date endTime);
 
    /**
     * 统计订单找回金额
     * @param startTime
     * @param endTime
     * @return
     */
    public List<CountOrderInfo> counOrderLastMoney(Date startTime, Date endTime);
 
    /**
     * 统计订单找回个数
     * @param startTime
     * @param endTime
     * @return
     */
    public List<CountOrderInfo> counOrderLastNum(Date startTime, Date endTime);
 
    
    /**
     * 统计订单总佣金
     * @param startTime
     * @param endTime
     * @return
     */
    public List<CountOrderInfo> counOrderTotalCommission(Date startTime, Date endTime);
 
    /**
     * 订单总单数
     * @param startTime
     * @param endTime
     * @return
     */
    public List<CountOrderInfo> counOrderTotalNum(Date startTime, Date endTime);
    
}