yujian
2020-05-25 391b2a3d85dcb55e0164b82beed416c413a85ee3
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
package com.yeshi.fanli.service.inter.order.dividents;
 
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
 
import com.yeshi.fanli.entity.order.dividents.TeamDividentsSourceOrderUserMap;
import com.yeshi.fanli.exception.ParamsException;
import com.yeshi.fanli.vo.order.TeamDividentsVO;
import com.yeshi.fanli.vo.order.TeamOrderVO;
 
/**
 * 分红源订单与参与分红用户的对应关系
 * @author Administrator
 *
 */
public interface TeamDividentsSourceOrderUserMapService {
 
    public TeamDividentsSourceOrderUserMap selectByPrimaryKeyForUpdate(Long id);
 
    /**
     * 发送到用户分红表
     * @Title: send
     * @Description: 
     * @param id 
     * void 返回类型
     * @throws
     */
    public void send(Long id);
 
    /**
     * 添加映射
     * @Title: addDividentsSourceOrderUserMap
     * @Description: 
     * @param map
     * @throws ParamsException 
     * void 返回类型
     * @throws
     */
    public void addDividentsSourceOrderUserMap(TeamDividentsSourceOrderUserMap map) throws ParamsException;
 
    /**
     * 获取可以发送的列表
     * @Title: listCanSend
     * @Description: 
     * @param sourceUid
     * @param maxPreSendTime
     * @param page
     * @param pageSize
     * @return 
     * List<TeamDividentsSourceOrderUserMap> 返回类型
     * @throws
     */
    public List<TeamDividentsSourceOrderUserMap> listCanSend(Long sourceUid, Date maxPreSendTime, int page,
            int pageSize);
 
    /**
     * 获取可以发送的列表数量
     * @Title: countCanSend
     * @Description: 
     * @param sourceUid
     * @param maxPreSendTime
     * @return 
     * long 返回类型
     * @throws
     */
    public long countCanSend(Long sourceUid, Date maxPreSendTime);
 
    /**
     * 根据源订单主键查询
     * @Title: countBySourceOrderId
     * @Description: 
     * @param sourceOrderId
     * @return 
     * long 返回类型
     * @throws
     */
    public long countBySourceOrderId(Long sourceOrderId);
 
    /**
     * 根据源订单主键查询
     * @Title: listBySourceOrderId
     * @Description: 
     * @param sourceOrderId
     * @return 
     * List<TeamDividentsSourceOrderUserMap> 返回类型
     * @throws
     */
    public List<TeamDividentsSourceOrderUserMap> listBySourceOrderId(Long sourceOrderId);
 
    /**
     * 获取能够分红的订单源用户列表
     * @Title: listCanSendSourceUidByPreSendTime
     * @Description: 
     * @param preSendTime
     * @param page
     * @param count
     * @return 
     * List<Long> 返回类型
     * @throws
     */
    public List<Long> listCanSendSourceUidByPreSendTime(Date preSendTime, int page, int count);
 
    /**
     * 获取能够分红的订单源用户ID数量
     * @Title: countCanSendUidByPreSendTime
     * @Description: 
     * @param preSendTime
     * @return 
     * Long 返回类型
     * @throws
     */
    public Long countCanSendSourceUidByPreSendTime(Date preSendTime);
 
    /**
     * 订单失效
     * @Title: invalidBySourceOrderId
     * @Description: 
     * @param sourceOrderId 
     * void 返回类型
     * @throws
     */
    public void invalidBySourceOrderId(Long sourceOrderId);
 
    /**
     * 用户对应的订单失效
     * @Title: invalidOrderBySourceUid
     * @Description: 
     * @param sourceUid 
     * void 返回类型
     * @throws
     */
    public void invalidOrderBySourceUid(Long sourceUid,String beiZhu);
 
    /**
     * 订单结算
     * @Title: orderSettle
     * @Description: 
     * @param sourceOrderId
     * @param income 
     * void 返回类型
     * @throws
     */
    public void orderSettle(Long sourceOrderId, Date preSendTime, BigDecimal income);
 
    /**
     * 订单变化更新资金
     * @Title: updateMoney
     * @Description: 
     * @param sourceOrderId
     * @param income 
     * void 返回类型
     * @throws
     */
    public void updateMoney(Long sourceOrderId, BigDecimal income);
 
    /**
     * 查询分红信息
     * @param sourceOrderId
     * @param targetUid
     * @return
     */
    public List<TeamDividentsSourceOrderUserMap> listBySourceOrderIdAndTargetUid(Long sourceOrderId, Long targetUid);
 
    /**
     * 统计每个订单补贴-分红
     * @param start
     * @param count
     * @param targetUid
     * @param minTime
     * @param maxTime
     * @return
     */
    public List<TeamDividentsVO> listByDateAndTargetUid(long start, int count, Long targetUid, Date minTime, Date maxTime, String key);
 
    public long countByDateAndTargetUid(Long targetUid, Date minTime, Date maxTime, String key);
 
    public TeamDividentsVO sumByDateAndTargetUid(Long targetUid, Date minTime, Date maxTime, String key);
 
    /**
     * 根据uid 和订单号搜索
     * @param start
     * @param count
     * @param sourceUid
     * @param targetUid
     * @param key
     * @return
     */
    public List<TeamOrderVO> searchByOrderNoOrSourceUid(long start, int count, Long targetUid, String key);
 
    public long countSearchByOrderNoOrSourceUid(Long targetUid, String key);
 
}