MerchantStaffPersonalController.java
11.4 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
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
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
package cn.com.glsx.stoassistant.controller;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import cn.com.glsx.scrm.shopmall.model.ShopmallStaffMotivationOperation;
import cn.com.glsx.stoassistant.model.response.score.MerchantStaffScoreListRpcResponse;
import cn.com.glsx.stoassistant.request.CommonIdRequest;
import cn.com.glsx.stoassistant.request.cusgroup.MerchantIdRopRequest;
import cn.com.glsx.stoassistant.request.cusgroup.WelfareGroupRopRequest;
import cn.com.glsx.stoassistant.request.merchant.MerchantBaseInfoRequest;
import cn.com.glsx.stoassistant.request.withdrawal.MerchantStaffScoreSearchRopRequest;
import cn.com.glsx.stoassistant.request.withdrawal.MerchantStaffWithdrawalBankRequest;
import cn.com.glsx.stoassistant.request.withdrawal.MerchantStaffWithdrawalInsertRopRequest;
import cn.com.glsx.stoassistant.response.custgroup.GameTaskCustomerRopResponse;
import cn.com.glsx.stoassistant.response.custgroup.GroupCountRopResponse;
import cn.com.glsx.stoassistant.response.custgroup.StaffWelfareGroupDetailRopResponse;
import cn.com.glsx.stoassistant.response.score.MerchantStaffScoreDetailRopResponse;
import cn.com.glsx.stoassistant.response.score.MerchantStaffScoreListRopResponse;
import cn.com.glsx.stoassistant.response.score.MerchantStaffWithdrawalBankVO;
import cn.com.glsx.stoassistant.response.withdrawal.MerchantStaffWithdrawalListRopResponse;
import cn.com.glsx.stoassistant.service.MerchantStaffPersonalService;
import cn.com.glsx.stoassistant.service.WechatCloudWelfareGroupService;
import cn.com.glsx.stoassistant.utils.Pagination;
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;
import java.util.List;
/**
* @ClassName MerchantStaffScoreController
* @Description
* @Author lichongyuan
* @Date 2022/10/15
*/
@Slf4j
@Api("员工个人中心接口")
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.YES)
public class MerchantStaffPersonalController {
@Autowired
private MerchantStaffPersonalService merchantStaffPersonalService;
@Autowired
private WechatCloudWelfareGroupService welfareGroupService;
/**
* 个人中心-员工积分详情
*
* @param request 入参
* @return
*/
@ServiceMethod(method = "stoassistant.api.score.detail", needInSession = NeedInSessionType.YES)
@ApiOperation("个人中心-员工积分详情")
public RopResponse<MerchantStaffScoreDetailRopResponse> getStaffScoreDetail(MerchantStaffScoreSearchRopRequest request) {
try {
MerchantStaffScoreDetailRopResponse response = merchantStaffPersonalService.getStaffScoreDetail(request);
return RopResponse.success(response);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffPersonalController__invoke__getStaffScoreDetail__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 个人中心-员工提现列表
*
* @param request 入参
* @return
*/
@ServiceMethod(method = "stoassistant.api.withdrawal.list", needInSession = NeedInSessionType.YES)
@ApiOperation("个人中心-员工提现列表")
public RopResponse<List<MerchantStaffWithdrawalListRopResponse>> getWithdrawalList(MerchantStaffScoreSearchRopRequest request) {
try {
List<MerchantStaffWithdrawalListRopResponse> response = merchantStaffPersonalService.getWithdrawalList(request);
return RopResponse.success(response);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffPersonalController__invoke__getWithdrawalList__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 单个提现
*
* @param request 入参
* @return
*/
@ServiceMethod(method = "stoassistant.api.withdrawal.insert", needInSession = NeedInSessionType.YES)
@ApiOperation("单个提现")
public RopResponse<Boolean> insertWithdrawal(MerchantStaffWithdrawalInsertRopRequest request) {
try {
merchantStaffPersonalService.insertWithdrawal(request);
return RopResponse.success(true);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffPersonalController__invoke__insertWithdrawal__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
/**
* 个人中心-积分列表
*
* @param request 入参
* @return
*/
@ServiceMethod(method = "stoassistant.api.score.list", needInSession = NeedInSessionType.YES)
@ApiOperation("个人中心-积分收益列表")
public RopResponse<Pagination<MerchantStaffScoreListRopResponse>> getStaffScoreList(MerchantStaffScoreSearchRopRequest request) {
try {
Pagination<MerchantStaffScoreListRopResponse> staffScoreList = merchantStaffPersonalService.getStaffScoreList(request);
return RopResponse.success(staffScoreList);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffPersonalController__invoke__getStaffScoreList__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "stoassistant.api.score.list.detail", needInSession = NeedInSessionType.YES)
@ApiOperation("个人中心-积分收益详情")
public RopResponse<MerchantStaffScoreListRpcResponse> getStaffScoreDetail(CommonIdRequest request) {
try {
return RopResponse.success(merchantStaffPersonalService.getStaffScoreDetailById(request));
} catch (RpcServiceException e) {
log.info("=======MerchantStaffPersonalController__invoke__getStaffScoreDetail__exception:{}", e.getMessage());
return RopResponse.error(e);
}
}
@ApiOperation("客户活跃代运营的看板")
@ServiceMethod(method = "scrm.api.stoassistant.wechat.cloud.welfare.statics", needInSession = NeedInSessionType.YES)
public RopResponse<GroupCountRopResponse> selectWelfareStaticCountByStaff(WelfareGroupRopRequest request){
try {
GroupCountRopResponse response = welfareGroupService.selectWelfareStaticCountByStaff(request);
return RopResponse.success(response);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffPersonalController__invoke__selectWelfareStatics__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ApiOperation("查询员工与福利官创建的群聊列表")
@ServiceMethod(method = "scrm.api.stoassistant.wechat.cloud.welfare.group", needInSession = NeedInSessionType.YES)
public RopResponse<List<StaffWelfareGroupDetailRopResponse>> selectWelfareGroupDetail(WelfareGroupRopRequest request){
try {
List<StaffWelfareGroupDetailRopResponse> response = welfareGroupService.selectWelfareGroupDetail(request);
return RopResponse.success(response);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffPersonalController__invoke__selectWelfareGroupDetail__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ApiOperation("查询访客详情")
@ServiceMethod(method = "scrm.api.stoassistant.wechat.cloud.welfare.customerVisit", needInSession = NeedInSessionType.NO)
public RopResponse<List<GameTaskCustomerRopResponse>> taskCustomerVisitList(MerchantIdRopRequest request){
try {
List<GameTaskCustomerRopResponse> response = welfareGroupService.taskCustomerVisitList(request);
return RopResponse.success(response);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffPersonalController__invoke__customerVisit__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ApiOperation("插入或更新员工银行卡信息")
@ServiceMethod(method = "scrm.api.stoassistant.withdrawal.staff.bank.insetorupdate", needInSession = NeedInSessionType.YES)
public RopResponse<Boolean> insertOrUpdateStaffBank(MerchantStaffWithdrawalBankRequest request){
try {
Boolean response = merchantStaffPersonalService.insertOrUpdateStaffBank(request);
return RopResponse.success(response);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffPersonalController__invoke__insertOrUpdateStaffBank__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ApiOperation("根据员工id查询员工银行卡列表")
@ServiceMethod(method = "scrm.api.stoassistant.withdrawal.staff.bank.list", needInSession = NeedInSessionType.YES)
public RopResponse<List<MerchantStaffWithdrawalBankVO>> staffBankList(MerchantStaffWithdrawalBankRequest request){
try {
List<MerchantStaffWithdrawalBankVO> response = merchantStaffPersonalService.staffBankList(request);
return RopResponse.success(response);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffPersonalController__invoke__staffBankList__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ApiOperation("根据id查询银行卡详情")
@ServiceMethod(method = "scrm.api.stoassistant.withdrawal.staff.bank.detail", needInSession = NeedInSessionType.YES)
public RopResponse<MerchantStaffWithdrawalBankVO> staffBankDetail(MerchantStaffWithdrawalBankRequest request){
try {
MerchantStaffWithdrawalBankVO response = merchantStaffPersonalService.staffBankDetail(request);
return RopResponse.success(response);
} catch (RpcServiceException e) {
log.info("=======MerchantStaffPersonalController__invoke__staffBankDetail__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ApiOperation("查询门店银行卡提现费率")
@ServiceMethod(method = "scrm.api.stoassistant.withdrawal.staff.rate", needInSession = NeedInSessionType.NO)
public RopResponse<String> getWithdrawalRate(MerchantBaseInfoRequest request){
try {
return RopResponse.success(merchantStaffPersonalService.getWithdrawalRate(request));
} catch (RpcServiceException e) {
log.info("=======MerchantStaffPersonalController__invoke__getWithdrawalRate__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ApiOperation("查询指定订单的操作记录")
@ServiceMethod(method = "scrm.api.stoassistant.staff.motivation.order.operation")
public RopResponse<List<ShopmallStaffMotivationOperation>> getOrderOperation(MerchantStaffScoreSearchRopRequest request) {
try {
return RopResponse.success(merchantStaffPersonalService.getOrderOperation(request));
} catch (RpcServiceException e) {
log.info("=======MerchantStaffPersonalController__invoke__getWithdrawalRate__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
}