admin
2020-03-19 0d91bad397c1a1b41bc77d9cd9f7555ed78f7f1a
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
package com.yeshi.fanli.service.inter.order;
 
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
 
import com.yeshi.fanli.entity.order.InviteOrderSubsidy;
import com.yeshi.fanli.entity.order.OrderTeamReward;
import com.yeshi.fanli.exception.order.OrderTeamRewardException;
 
public interface OrderTeamRewardService {
 
    /**
     * 查询补贴
     * 
     * @param uid
     * @param orderNo
     * @param type
     * @return
     */
    public OrderTeamReward getByOrderNoAndType(Long uid, String orderNo, Integer type);
 
    /**
     * 查询补贴(加锁)
     * @param uid
     * @param orderNo
     * @param type
     * @return
     */
    public OrderTeamReward getByOrderNoAndTypeForUpdate(Long uid, String orderNo, Integer type);
 
    /**
     * 添加或修改(按照订单号与来源)
     * 
     * @param orderId
     * @param sourceType
     */
    public void addOrUpdate(InviteOrderSubsidy subsidy, BigDecimal money, Long uid,int level)
            throws OrderTeamRewardException;
 
    /**
     * 根据订单号与来源查询
     * 
     * @param orderId
     * @param sourceType
     * @return
     */
    public long countByOrderIdAndSourceType(String orderId, int sourceType);
 
    /**
     * 使订单号对应的数据失效
     * 
     * @param orderId
     * @param sourceType
     */
    public void invalidByOrderIdAndSourceType(Long subsidyId);
 
    /**
     * 使订单号对应的数据有效
     * @param orderId
     * @param sourceType
     */
    public void validByOrderIdAndSourceType(Long subsidyId,Date preGetTime);
 
    /**
     * 结算金额
     * @param id
     * @param money
     */
    public void settleById(Long id, BigDecimal money);
    
    /**
     * 根据补贴ID获取团队奖励
     * @Title: listBySubsidyId
     * @Description: 
     * @param subsidyId
     * @return 
     * List<OrderTeamReward> 返回类型
     * @throws
     */
    public List<OrderTeamReward> listBySubsidyId(Long subsidyId);
    
    
    /**
     * 查询可以结算的
     * @Title: listCanSettle
     * @Description: 
     * @param uid
     * @param page
     * @param pageSize
     * @return 
     * List<OrderTeamReward> 返回类型
     * @throws
     */
    public List<OrderTeamReward> listCanSettle(Long uid,int page,int pageSize);
    
    /**
     * 统计可以结算的数量
     * @Title: countCanSettle
     * @Description: 
     * @param uid
     * @return 
     * long 返回类型
     * @throws
     */
    public long countCanSettle(Long uid);
    
    
}