admin
2020-02-23 b59fef5c00b15fdfdfa9d4be26e5bf6b41c75458
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
package com.yeshi.fanli.service.inter.redpack;
 
import java.math.BigDecimal;
import java.util.List;
 
import com.yeshi.fanli.entity.common.AdminUser;
import com.yeshi.fanli.entity.redpack.RedPackExchange;
import com.yeshi.fanli.exception.redpack.RedPackExchangeException;
 
public interface RedPackExchangeService {
 
    /**
     * 提现转换现金
     * @param uid
     * @param amount
     * @throws RedPackExchangeException
     */
    public void exchangeCash(Long uid, BigDecimal amount) throws RedPackExchangeException;
 
    /**
     * 后台查询
     * @param start
     * @param count
     * @param key
     * @param state
     * @return
     */
    public List<RedPackExchange> query(Integer start, Integer count, String key, Integer state);
 
    public Long count(String key, Integer state);
 
    /**
     * 统计各个状态
     * @param uid
     * @return
     */
    public Long countByUidAndState(long uid,  Integer state);
 
 
    /**
     * 获取申请
     * @param id
     * @return
     */
    public RedPackExchange selectByPrimaryKey(long id);
 
    /**
     * 提现通过
     * @param id
     * @param admin
     * @throws RedPackExchangeException
     */
    public void passExchange(long id, AdminUser admin) throws RedPackExchangeException;
 
    /**
     * 提现拒绝
     * @param id
     * @param reason
     * @param admin
     * @throws RedPackExchangeException
     */
    public void rejectExchange(long id, String reason, AdminUser admin) throws RedPackExchangeException;
 
    /**
     * 统计状态
     * @param uid
     * @param state
     * @return
     */
    public BigDecimal countMoneyByUidAndState(Long uid, Integer state);
 
 
}