admin
2020-05-20 98b1a0affd69bbe63223c21fdd2c404e8bedfccb
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
package com.yeshi.fanli.service.inter.money;
 
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
 
import com.yeshi.fanli.entity.money.TeamRewardDebt;
import com.yeshi.fanli.exception.money.TeamRewardDebtException;
 
public interface TeamRewardDebtService {
 
    /**
     * 添加债务
     * 
     * @param debt
     * @throws TeamRewardDebtException
     */
    public void addDebt(TeamRewardDebt debt) throws TeamRewardDebtException;
 
    /**
     * 偿还债务
     * 
     * @param debtId
     * @param money
     */
    public void repayDebt(Long debtId, BigDecimal money) throws TeamRewardDebtException;
 
    /**
     * 还款
     * 
     * @param uid
     * @param money
     * @return 还剩下的资金
     * @throws TeamRewardDebtException
     */
    public BigDecimal repayDebtByUid(Long uid,Date maxEstimatePayTime, BigDecimal money) throws TeamRewardDebtException;
 
    /**
     * 检索需要偿还的债务
     * 
     * @param uid
     * @param page
     * @param count
     * @return
     */
    public List<TeamRewardDebt> listNeedRepayDebt(Long uid,Date maxEstimatePayTime, int page, int count);
 
    /**
     * 检索需要偿还的债务
     * 
     * @param uid
     * @return
     */
    public long countNeedRepayDebt(Long uid,Date maxEstimatePayTime);
 
    /**
     * 获取总共欠钱金额
     * 
     * @param uid
     * @return
     */
    public BigDecimal getTotalDebtMoney(Long uid,Date maxEstimatePayTime);
    
    /**
     * 通过唯一标识查询
     * @Title: selectBySourceId
     * @Description: 
     * @param sourceId
     * @return 
     * TeamRewardDebt 返回类型
     * @throws
     */
    public TeamRewardDebt selectBySourceId(Long sourceId);
 
}