MerchantStaffWithdrawalController.java
5.85 KB
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
package cn.com.glsx.merchants.controller;
import cn.com.glsx.framework.core.beans.rpc.RpcResponse;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.merchants.request.withdrawal.MerchantStaffFailBatchRopRequest;
import cn.com.glsx.merchants.request.withdrawal.MerchantStaffWithdrawalSearchRopRequest;
import cn.com.glsx.merchants.request.withdrawal.MerchantStaffWithdrawalUpdateRopRequest;
import cn.com.glsx.merchants.request.withdrawal.StaffWithdrawalImportRopRequest;
import cn.com.glsx.merchants.response.withdrawal.MerchantStaffWithdrawalListRopResponse;
import cn.com.glsx.merchants.response.withdrawal.StaffImportWithdrawalRopResponse;
import cn.com.glsx.merchants.service.MerchantStaffWithdrawalService;
import cn.com.glsx.merchants.util.WithdrawalPagination;
import cn.com.glsx.stoassistant.model.request.withdrawal.MerchantStaffWithdrawalSearchRpcRequest;
import com.rop.annotation.NeedInSessionType;
import com.rop.annotation.ServiceMethod;
import com.rop.annotation.ServiceMethodBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
/**
* @ClassName MerchantStaffWithdrawalController
* @Description
* @Author lichongyuan
* @Date 2022/10/14
*/
@Slf4j
@Api("提现管理接口")
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.NO)
public class MerchantStaffWithdrawalController {
@Autowired
private MerchantStaffWithdrawalService merchantStaffWithdrawalService;
/**
* 提现列表
*/
/**
* 提现列表
*
* @param request 入参
* @return
*/
@ServiceMethod(method = "merchants.api.staff.withdrawal.page", needInSession = NeedInSessionType.NO)
@ApiOperation("提现列表")
public RopResponse<WithdrawalPagination<MerchantStaffWithdrawalListRopResponse>> getWithdrawalPage(MerchantStaffWithdrawalSearchRopRequest request) {
try {
WithdrawalPagination<MerchantStaffWithdrawalListRopResponse> withdrawalPage = merchantStaffWithdrawalService.getWithdrawalPage(request);
return RopResponse.success(withdrawalPage);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffWithdrawalController__invoke__getWithdrawalPage__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 提现列表导出
*
* @param request 入参
* @return
*/
@ServiceMethod(method = "merchants.api.staff.withdrawal.exportList", needInSession = NeedInSessionType.NO)
@ApiOperation("提现列表导出")
public RopResponse<String> exportList(MerchantStaffWithdrawalSearchRopRequest request) {
try {
String url = merchantStaffWithdrawalService.exportList(request);
return RopResponse.success(url);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffWithdrawalController__invoke__exportList__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 批量提现审核
*/
/**
* 批量提现审核
*
* @param request 入参
* @return
*/
@ServiceMethod(method = "merchants.api.staff.withdrawal.batchWithdrawal", needInSession = NeedInSessionType.NO)
@ApiOperation("批量提现审核")
public RopResponse<Boolean> batchWithdrawal(MerchantStaffWithdrawalUpdateRopRequest request) {
try {
merchantStaffWithdrawalService.batchWithdrawal(request);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffWithdrawalController__invoke__batchWithdrawal__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.staff.withdrawal.batchFail", needInSession = NeedInSessionType.NO)
@ApiOperation("批量失败")
public RopResponse<Boolean> failBatch(MerchantStaffFailBatchRopRequest request){
try {
return RopResponse.success(merchantStaffWithdrawalService.failBatch(request));
} catch (RpcServiceException e) {
log.info("=======MerchantStaffWithdrawalController__invoke__batchFail__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.staff.withdrawal.importBankWithdrawal", needInSession = NeedInSessionType.NO)
@ApiOperation("提现结果导入")
public RopResponse<StaffImportWithdrawalRopResponse> importBankWithdrawal(StaffWithdrawalImportRopRequest request){
try {
return RopResponse.success(merchantStaffWithdrawalService.importBankWithdrawal(request));
} catch (RpcServiceException e) {
log.info("=======MerchantStaffWithdrawalController__invoke__importBankWithdrawal__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "merchants.api.staff.withdrawal.exportBankWithdrawal", needInSession = NeedInSessionType.NO)
@ApiOperation("导出提现结果")
public RopResponse<String> exportBankWithdrawal(MerchantStaffWithdrawalSearchRopRequest request){
try {
return RopResponse.success(merchantStaffWithdrawalService.exportBankWithdrawal(request));
} catch (RpcServiceException e) {
log.info("=======MerchantStaffWithdrawalController__invoke__exportBankWithdrawal__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
}