MerchantWithdrawalPointsConfigController.java
5.04 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
package cn.com.glsx.stoassistant.controller.withdrawal;
import cn.com.glsx.framework.core.beans.rpc.RpcPagination;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.stoassistant.model.response.withdrawal.MerchantWithdrawalPointsConfigResponse;
import cn.com.glsx.stoassistant.request.withdrawal.MerchantWithdrawalPointsConfigCheckRopRequest;
import cn.com.glsx.stoassistant.request.withdrawal.MerchantWithdrawalPointsConfigDeleteRopRequest;
import cn.com.glsx.stoassistant.request.withdrawal.MerchantWithdrawalPointsConfigSaveRopRequest;
import cn.com.glsx.stoassistant.request.withdrawal.MerchantWithdrawalPointsConfigSearchRopRequest;
import cn.com.glsx.stoassistant.service.withdrawal.MerchantWithdrawalPointsConfigService;
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;
/**
* @Author yelq
* @Version 1.0
* @Description: 提现白名单
* @Date 2023/8/10 17:46
*/
@Slf4j
@Api("积分提现门店白名单")
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.YES)
public class MerchantWithdrawalPointsConfigController {
@Autowired
private MerchantWithdrawalPointsConfigService merchantWithdrawalPointsConfigService;
@ServiceMethod(method = "stoassistant.api.withdrawal.of.points.page", needInSession = NeedInSessionType.YES)
@ApiOperation("积分提现门店白名单列表分页查询")
public RopResponse<RpcPagination<MerchantWithdrawalPointsConfigResponse>> withdrawalOfPointsPage(MerchantWithdrawalPointsConfigSearchRopRequest request) {
try {
RpcPagination<MerchantWithdrawalPointsConfigResponse> pagination = merchantWithdrawalPointsConfigService.withdrawalOfPointsPage(request);
return RopResponse.success(pagination);
} catch (RpcServiceException e) {
log.info("=======MerchantWithdrawalPointsConfigController__invoke__withdrawalOfPointsPage__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}catch (Exception e){
log.error(e.getMessage(),e);
return RopResponse.error(e.getMessage());
}
}
@ServiceMethod(method = "stoassistant.api.withdrawal.of.points.merchant.check", needInSession = NeedInSessionType.YES)
@ApiOperation("积分提现门店白名单配置校验")
public RopResponse<MerchantWithdrawalPointsConfigResponse> withdrawalOfPointsMerchantCheck(MerchantWithdrawalPointsConfigCheckRopRequest request) {
try {
MerchantWithdrawalPointsConfigResponse response = merchantWithdrawalPointsConfigService.withdrawalOfPointsMerchantCheck(request);
return RopResponse.success(response);
} catch (RpcServiceException e) {
log.info("=======MerchantWithdrawalPointsConfigController__invoke__withdrawalOfPointsMerchantCheck__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}catch (Exception e){
log.error(e.getMessage(),e);
return RopResponse.error(e.getMessage());
}
}
@ServiceMethod(method = "stoassistant.api.withdrawal.of.points.merchant.list.save", needInSession = NeedInSessionType.YES)
@ApiOperation("积分提现门店白名单配置")
public RopResponse<Boolean> withdrawalOfPointsMerchantListSave(MerchantWithdrawalPointsConfigSaveRopRequest request) {
try {
Boolean response = merchantWithdrawalPointsConfigService.withdrawalOfPointsMerchantListSave(request);
return RopResponse.success(response);
} catch (RpcServiceException e) {
log.info("=======MerchantWithdrawalPointsConfigController__invoke__withdrawalOfPointsMerchantListSave__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}catch (Exception e){
log.error(e.getMessage(),e);
return RopResponse.error(e.getMessage());
}
}
@ServiceMethod(method = "stoassistant.api.withdrawal.of.points.merchant.list.delete", needInSession = NeedInSessionType.YES)
@ApiOperation("积分提现门店白名单删除")
public RopResponse<Boolean> withdrawalOfPointsMerchantListDelete(MerchantWithdrawalPointsConfigDeleteRopRequest request) {
try {
Boolean response = merchantWithdrawalPointsConfigService.withdrawalOfPointsMerchantListDelete(request);
return RopResponse.success(response);
} catch (RpcServiceException e) {
log.info("=======MerchantWithdrawalPointsConfigController__invoke__withdrawalOfPointsMerchantListDelete__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}catch (Exception e){
log.error(e.getMessage(),e);
return RopResponse.error(e.getMessage());
}
}
}