8.3
luodangjia
2024-08-03 67157345fe1878681e39ec186ef37ff6b3b5c1fc
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
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
package com.ruoyi.order.api.feignClient;
 
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.constant.ServiceNameConstants;
import com.ruoyi.common.core.domain.R;
import com.ruoyi.order.api.entity.*;
import com.ruoyi.order.api.factory.WithdrawFallbackFactory;
import io.swagger.annotations.ApiOperation;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;
 
import java.math.BigDecimal;
import java.util.List;
 
/**
 * @author HJL
 * @since 2024.05.29
 */
@FeignClient(contextId = "OrderClient", value = ServiceNameConstants.ORDER_SERVICE, fallbackFactory = WithdrawFallbackFactory.class)
public interface WithdrawClient {
 
    /**
     * 用户所关联提现记录分页列表
     *
     * @param nickname     用户昵称
     * @param userPhone    用户手机号
     * @param applyForTime 申请时间
     * @param state        状态
     * @param pageNum      页码
     * @param pageSize     每页显示条数
     * @return 分页列表
     */
    @GetMapping(value = "/withdraw/withdrawPage")
    R<Page<UserWithdrawRecordVO>> withdrawPage(@RequestParam(value = "nickname", required = false) String nickname,
                                               @RequestParam(value = "userPhone", required = false) String userPhone,
                                               @RequestParam(value = "applyForTime", required = false) String applyForTime,
                                               @RequestParam(value = "state", required = false) Integer state,
                                               @RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
                                               @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                            @RequestParam(name = "userIds") List<Integer> userIds);
 
    @GetMapping(value = "/withdraw/withdrawPage1")
    R<Page<UserWithdrawRecordVO>> withdrawPage1(@RequestParam(value = "cityList", required = false)List<String> cityList,@RequestParam(value = "nickname", required = false) String nickname,
                                               @RequestParam(value = "userPhone", required = false) String userPhone,
                                               @RequestParam(value = "applyForTime", required = false) String applyForTime,
                                               @RequestParam(value = "state", required = false) Integer state,
                                               @RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
                                               @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize,
                                               @RequestParam(name = "userIds") List<Integer> userIds);
 
    /**
     * 查看提现记录详情
     *
     * @param id 提现记录id
     * @return 提现详情
     */
    @GetMapping(value = "/withdraw/withdrawRecordDetail")
    R<Withdraw> withdrawRecordDetail(@RequestParam("id") Long id);
 
    /**
     * 用户提现记录导出
     *
     * @param exportRequest 提现记录
     * @return 筛选数据列表
     */
    @ApiOperation(value = "用户提现管理-excel导出用户提现记录", tags = {"后台-用户管理-提现列表"})
    @PostMapping(value = "/withdraw/excelExport")
    R<List<UserWithdrawRecordVO>> excelExport(@RequestBody WithdrawExportRequest exportRequest);
 
    /**
     * 批量删除提现记录
     *
     * @param ids 提现记录多条id拼接
     * @return 封装分页数据
     */
    @GetMapping(value = "/withdraw/batchDelete")
    R<String> batchDelete(@RequestParam("ids") String ids);
 
    /**
     * 提现管理-提现审批
     *
     * @param id      提现记录id
     * @param state   审批结果
     * @param opinion 审批意见
     * @param openId  微信用户openId
     * @param userId  用户id
     * @return 提现结果
     */
    @GetMapping(value = "/withdraw/withdrawExamine")
    R<Boolean> withdrawExamine(@RequestParam("id") Long id, @RequestParam("state") Integer state,
                               @RequestParam(value = "opinion", required = false) String opinion,
                               @RequestParam(value = "openId") String openId,
                               @RequestParam(value = "userId") Integer userId);
 
    /**
     * 根据类型统计提现金额
     *
     * @param request 根据类型统计提现金额
     * @return 封装分页数据
     */
    @PostMapping(value = "/withdraw/withdrawalTotalMoney")
    R<BigDecimal> withdrawalTotalMoney(@RequestBody MoneyQueryRequest request);
 
    /**
     * 修改系统设置-关闭/开启审核
     *
     * @param enableProcess 审核状态
     * @return 操作结果
     */
    @ApiOperation(value = "关闭/开启审核", tags = {"后台-用户管理-用户列表"})
    @GetMapping(value = "/withdraw/enableProcess")
    R<Boolean> enableProcess(@RequestParam("enableProcess") Integer enableProcess);
 
    /**
     * 获取系统设置-审核设置
     * --远程调用
     *
     * @return 操作结果
     */
    @GetMapping(value = "/withdraw/withdrawProcess")
    R<WithdrawalSetting> withdrawProcess();
 
    /**
     * 全局审核状态
     *
     * @return 全局审核状态
     */
    @GetMapping(value = "/withdraw/withdrawState")
    R<WithdrawalSetting> withdrawState();
 
    /**
     * 用户所关联提现记录分页列表
     *
     * @param userId   用户id
     * @param pageNum  页码
     * @param pageSize 每页显示条数
     * @return 分页列表
     */
    @GetMapping(value = "/withdraw/withdrawList")
    R<Page<UserWithdrawRecordVO>> withdrawList(@RequestParam("userId") Integer userId,
                                               @RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
                                               @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize);
 
    @GetMapping(value = "/withdraw/withdrawList1")
    R<Page<UserWithdrawRecordVO>> withdrawList1(@RequestParam("cityList") List<String> cityList,
                                                @RequestParam("userId") Integer userId,
                                               @RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
                                               @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize);
 
 
    /**
     * 根据订单获取用户提现申请记录
     *
     * @param orderId 订单id
     * @param userId  用户id
     * @return 提现记录
     */
    @GetMapping(value = "/withdraw/withdrawRecordByUser")
    R<List<Withdraw>> withdrawRecordByUser(@RequestParam("orderId") String orderId,
                                           @RequestParam("userId") Integer userId);
 
    /**
     * 用户端-用户提交提现申请
     *
     * @param orderId   订单id
     * @param userId    用户id
     * @param openId    微信用户openId
     * @param userPhone 用户手机号
     * @return 提现结果
     */
    @GetMapping(value = "/withdraw/confirmWithdrawByUser")
    R<Boolean> confirmWithdrawByUser(@RequestParam("orderId") String orderId,
                                     @RequestParam("userId") Integer userId,
                                     @RequestParam("openId") String openId,
                                     @RequestParam("userPhone") String userPhone);
 
    /**
     * 用户订单列表
     *
     * @param userId   用户id
     * @param pageNum  页码
     * @param pageSize 条数
     * @return 订单列表
     */
    @GetMapping("/withdraw/withdrawListByUser")
    R<Page<Order>> withdrawListByUser(@RequestParam("userId") Integer userId,
                                      @RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
                                      @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize);
 
    @GetMapping("/withdraw/withdrawRecordList")
    @ApiOperation(value = "用户提现申请记录", tags = {"用户端"})
    R<Page<Withdraw>> withdrawRecordList(@RequestParam("userId") Integer userId,
                                         @RequestParam(name = "pageNum", defaultValue = "1") Integer pageNum,
                                         @RequestParam(name = "pageSize", defaultValue = "10") Integer pageSize);
 
    /**
     * 提现订单详情
     *
     * @param orderId 订单id
     * @return 订单详情
     */
    @GetMapping("/withdraw/withdrawDetailByUser")
    R<WithdrawDetailVO> withdrawDetailByUser(@RequestParam("orderId") String orderId);
 
}