admin
2020-04-13 457265eb82265650cf6c87519803975f23bd2fd3
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
package com.yeshi.fanli.service.inter.order;
 
import java.math.BigDecimal;
import java.util.Date;
 
import com.yeshi.fanli.entity.bus.user.vip.UserLevelEnum;
import com.yeshi.fanli.entity.order.CommonOrder;
 
/**
 * 订单类红包计算服务
 * @author Administrator
 *
 */
public interface OrderHongBaoMoneyComputeService {
 
    /**
     * 获取基础的返利金额
     * @Title: computeBaseFanliMoney
     * @Description: 
     * @param order
     * @return 
     * BigDecimal 返回类型
     * @throws
     */
    public BigDecimal computeBaseFanliMoney(CommonOrder order);
 
    /**
     * 获取基础的分享金额
     * @Title: computeBaseShareMoney
     * @Description: 
     * @param order
     * @return 
     * BigDecimal 返回类型
     * @throws
     */
    public BigDecimal computeBaseShareMoney(CommonOrder order);
 
    /**
     * 计算自购订单返利金额
     * @Title: computeFanliMoney
     * @Description: 
     * @param order
     * @param userLevel
     * @return 
     * BigDecimal 返回类型
     * @throws
     */
    public BigDecimal computeFanliMoney(CommonOrder order, UserLevelEnum userLevel);
 
    /**
     * 计算分享订单奖金金额
     * @Title: computeShareMoney
     * @Description: 
     * @param order
     * @param userLevel
     * @return 
     * BigDecimal 返回类型
     * @throws
     */
    public BigDecimal computeShareMoney(CommonOrder order, UserLevelEnum userLevel);
 
    /**
     * 计算直接粉丝邀请奖金
     * @Title: computeFirstInviteMoney
     * @Description: 
     * @param order
     * @return 
     * BigDecimal 返回类型
     * @throws
     */
    public BigDecimal computeFirstInviteMoney(CommonOrder order, UserLevelEnum buyer);
 
    /**
     * 计算间接粉丝邀请奖金
     * @Title: computeSecondInviteMoney
     * @Description: 
     * @param order
     * @return 
     * BigDecimal 返回类型
     * @throws
     */
    public BigDecimal computeSecondInviteMoney(CommonOrder order, UserLevelEnum buyer);
 
    /**
     * 计算直接粉丝团队补贴
     * @Title: computeFirstTeamSubsidy
     * @Description: 
     * @param order
     * @param buyerUserLevel
     * @param userLevel
     * @return 
     * BigDecimal 返回类型
     * @throws
     */
    public BigDecimal computeFirstTeamSubsidy(BigDecimal fanLiMoney, Date placeOrderTime, UserLevelEnum buyerUserLevel,
            UserLevelEnum userLevel);
 
    /**
     * 计算间接粉丝团队补贴
     * @Title: computeSecondTeamSubsidy
     * @Description: 
     * @param order
     * @param buyerUserLevel
     * @param userLevel
     * @return 
     * BigDecimal 返回类型
     * @throws
     */
 
    public BigDecimal computeSecondTeamSubsidy(BigDecimal fanLiMoney, Date placeOrderTime, UserLevelEnum buyerUserLevel,
            UserLevelEnum userLevel);
 
 
    /**
     * 计算团队补贴
     * @param date 下单时间
     * @param buyerUserLevel 下单时 下单人当时等级
     * @param userLevel 下单时 上级人对应等级
     * @param direct 是否直接邀请关系
     * @return
     */
    public BigDecimal getTeamSubsidyRate(Date date, UserLevelEnum buyerUserLevel, UserLevelEnum userLevel, boolean direct);
 
}