yujian
2019-11-20 64d96fd02c487ff70b6d342534b2fb79089d35ba
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
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.vo.order.HongBaoV2VO;
 
public interface HongBaoV2CountService {
 
    /**
     * 统计历史总到账金额
     * 
     * @param uid
     * @param state
     * @return
     */
    public BigDecimal countMoneyByUidAndState(Long uid, Integer state);
 
    /**
     * 统计历史红包数量
     * 
     * @param uid
     * @param state
     * @return
     */
    public Integer countNumberByUidAndState(Long uid, Integer state);
 
    /**
     * 统计用户红包数量
     * 
     * @param uid
     * @return
     */
    public Integer countNumberByUid(Long uid);
 
    /**
     * 统计总金额
     * 
     * @param channel
     *            渠道
     * @param dateType
     *            日期格式 日-1 月-2 年-3
     * @param state
     *            状态
     * @param years
     *            年份
     * @param startTime
     *            开始时间
     * @param endTime
     *            结束时间
     * @return
     */
    public List<ChartTDO> countHongBaoMoney(String channel, Integer dateType, Integer state, String year,
            String startTime, String endTime) throws Exception;
 
    /**
     * 统计总金额
     * 
     * @param channel
     *            渠道
     * @param dateType
     *            日期格式 日-1 月-2 年-3
     * @param state
     *            状态
     * @param years
     *            年份
     * @param startTime
     *            开始时间
     * @param endTime
     *            结束时间
     * @return
     */
    public List<ChartTDO> countHongBaoNum(String channel, Integer dateType, Integer state, String year,
            String startTime, String endTime) throws Exception;
 
    /**
     * 分类型订单数与比例
     * 
     * @param dateType
     * @param type
     * @param year
     * @param startTime
     * @param endTime
     * @return
     * @throws Exception
     */
    public List<ChartTDO> getProportionByType(Integer dateType, Integer type, String year, String startTime,
            String endTime) throws Exception;
 
    /**
     * 统计提成订单数量
     * 
     * @param uid
     * @return
     */
    public int getTotalTiChengCount(Long uid);
 
    /**
     * 统计未失效订单数量
     * 
     * @param uid
     * @param dateType
     * @return
     */
    public long countValidNumberByUid(Long uid, Integer dateType);
 
    /**
     * 统计未到账金额
     * 
     * @param uid
     * @param dateType
     * @return
     */
    public BigDecimal countWillGetMoneyByUid(Long uid);
 
    /**
     * 最后一次下单时间
     * 
     * @param uid
     * @return
     */
    public Date getLastHongBaoTime(Long uid);
 
    public List<ChartTDO> count24HOderByChannel(String channel, Integer type, String years, String startTime,
            String endTime) throws Exception;
 
    /**
     * 统计所有类型订单数量
     * 
     * @param dateType
     * @param type
     * @param year
     * @param startTime
     * @param endTime
     * @return
     * @throws Exception
     */
    public List<ChartTDO> countHongBaoType(Integer dateType, Integer type, String year, String startTime,
            String endTime) throws Exception;
 
    /**
     * 查询邀请=分享奖金
     * 
     * @param start
     * @param count
     * @param date
     * @return
     */
    public List<HongBaoV2VO> listShareAndInviteMoney(long start, int count, String date);
 
    /**
     * 奖励券金额
     * 
     * @return
     */
    public BigDecimal countRebateCouponMoney();
 
    /**
     * 统计返利订单
     * @param uid
     * @return
     */
    public long countRebateOrder(Long uid);
 
    /**
     * 统计分享+ 邀请订单
     * @param uid
     * @return
     */
    public long countShareOrInviteOrder(Long uid);
    
    /**
     * 统计已到账
     * 
     * @param uid
     * @param typeList
     * @param minGetTime
     * @param maxGetTime
     * @return
     */
    public BigDecimal sumAlreadyGetMoneyByUid(Long uid, List<Integer> typeList, Date minGetTime, Date maxGetTime);
 
    public long countAlreadyGetMoneyByUid(Long uid, List<Integer> typeList, Date minGetTime, Date maxGetTime);
 
    /**
     * 查询来源该下级成功分享 + 自购订单 
     * @param uid
     * @param teamUid
     * @param endTime
     * @return
     */
    public BigDecimal getOrderRewardByTeamUid(Long uid, Long teamUid, Date endTime);
 
    /**
     * 统计该下级成功分享 + 自购订单 
     * @param uid
     * @param teamUid 下级id
     * @return
     */
    public BigDecimal getOrderRewardByTeamUidTheMonth(Long uid, Long teamUid);
 
}