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
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
package com.yeshi.fanli.service.inter.money.extract;
 
import java.math.BigDecimal;
import java.util.List;
import java.util.Map;
 
import org.yeshi.utils.entity.wx.RedPackRecord;
 
import com.yeshi.fanli.entity.bus.user.AlipayTransferResultInfo;
import com.yeshi.fanli.entity.bus.user.Extract;
import com.yeshi.fanli.entity.bus.user.UserInfo;
import com.yeshi.fanli.entity.common.AdminUser;
import com.yeshi.fanli.exception.ExtractException;
import com.yeshi.fanli.exception.NotExistObjectException;
import com.yeshi.fanli.exception.ObjectStateException;
 
public interface ExtractService {
 
    /**
     * 提现申请
     * 
     * @param extract
     * @return 返回如果为null,则提现申请提交成功。如果为1�?,已超过当日提现次数或提现金额!如果�?,提现金额大于我的红包!
     */
    public Integer addExtract(Extract extract);
 
    // public int getCount();
 
    /**
     * 通过
     * 
     * @param id
     * @return
     */
    public Integer passExtract(long id, AdminUser admin);
 
    /**
     * 拒绝
     * 
     * @param id
     * @param reason
     * @throws ObjectStateException
     * @throws NotExistObjectException
     */
    public void rejectExtract(long id, String reason, AdminUser adminUser)
            throws ObjectStateException, NotExistObjectException;
 
    /**
     * 
     * 方法说明: 根据提现记录id获取用户uid
     * 
     * @author mawurui createTime 2018年3月14日 下午3:43:22
     * @param id
     * @return
     */
    public Extract getExtractById(long id);
 
    /**
     * 用户提现校验
     * 
     * @param uid
     * @return
     */
    public void checkExtract(Long uid) throws ExtractException;
 
    public Extract selectByPrimaryKey(Long id);
 
    /**
     * 查询当前客服待处理
     * 
     * @return
     */
    public Extract getMyTaskInfo(Long adminId);
 
    public List<Map<String, Object>> getFinishRecord(int pageIndex, int pageSize, String key, String startTime,
            String endTime);
 
    /*
     * 更新提现记录
     */
    public int updateByPrimaryKeySelective(Extract record);
 
    public Extract getNewTaskInfo();
 
    /**
     * 处理提现结果
     * 
     * @param info
     */
    public void processExtractResult(AlipayTransferResultInfo info);
 
    public void testExtractSuccess(Long id);
 
    /**
     * 统计当日提现
     * 
     * @param uid
     * @param day  yyyy-MM-dd
     * @return
     */
    public BigDecimal sumTodayApplyMoney(Long uid, String day);
    
    /**
     * 统计正在审核中的金额
     * @param uid
     * @return
     */
    public BigDecimal sumVerifyingMoney(Long uid);
 
    
    /**
     * 自动提现-微信
     * @param user
     */
    public void autoExtract(UserInfo user);
 
 
    /**
     * 获取自动提现openid
     * @return
     */
    public List<String> getAutoExtractOpenIds()  throws Exception;
 
    /**
     * 更新手动微信提现红包记录
     * @param list
     * @throws ExtractException
     */
    public void updateManualExtractRecord(List<RedPackRecord> list) throws ExtractException;
 
    /**
     * 
     * @return
     * @throws Exception
     */
    public List<UserInfo> preAutoUser() throws Exception;
 
    public List<String> getAutoExtractOpenIdsTo1212() throws Exception;
 
    public List<UserInfo> preAutoUserTo1212() throws Exception;
 
    /**
     * 获取提现成功记录
     * @param page
     * @param pageSize
     * @param uid
     * @return
     */
    public List<Extract> getExtractSucceedRecord(int page, int pageSize, Long uid);
 
    /**
     * 统计提现成功记录
     * @param uid
     * @return
     */
    public long countExtractSucceedRecord(Long uid);
    
}