CloudControlLoginController.java
4.7 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
package cn.com.glsx.entmicro.controller.wechatcloudcontrol;
import cn.com.glsx.entmicro.model.response.EntmicroStaffResponse;
import cn.com.glsx.entmicro.model.response.wechatcloudcontrol.customer.CustomerInfoResponse;
import cn.com.glsx.entmicro.model.response.wechatcloudcontrol.login.CloudControQccodeResponse;
import cn.com.glsx.entmicro.request.wechatcloudcontrol.login.CustomerListRopResquest;
import cn.com.glsx.entmicro.request.wechatcloudcontrol.login.QcCodeRequest;
import cn.com.glsx.entmicro.request.wechatcloudcontrol.login.WechatDepositRopRequest;
import cn.com.glsx.entmicro.service.EntimicroStaffService;
import cn.com.glsx.entmicro.service.wechatcloudcontrol.CloudControlLoginService;
import cn.com.glsx.entmicro.utils.Pagination;
import cn.com.glsx.framework.core.exception.RpcServiceException;
import cn.com.glsx.framework.rop.response.RopResponse;
import com.rop.AbstractRopRequest;
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;
/**
* @BelongsProject: scrm_v2.11.0_20221010_1
* @BelongsPackage: cn.com.glsx.entmicro.controller.wechatcloudcontrol
* @Author: 11
* @CreateTime: 2022-09-21 18:57
* @Description: TODO
* @Version: 1.0
*/
@Slf4j
@Api("企微托管管理")
@ServiceMethodBean(version = "1.0.0", needInSession = NeedInSessionType.YES)
public class CloudControlLoginController {
@Autowired
private CloudControlLoginService cloudControlLoginService;
@Autowired
private EntimicroStaffService entimicroStaffService;
@ServiceMethod(method = "entmicro.api.wechatcloudcontrol.cloudconlogin.getLoginQcCode")
@ApiOperation("获取验证码")
public RopResponse<CloudControQccodeResponse> getLoginQcCode(AbstractRopRequest abstractRopRequest) {
try {
return RopResponse.success(cloudControlLoginService.getLoginQcCode());
} catch (RpcServiceException e) {
log.info("=======CloudControlLoginController_getLoginQcCode_invoke__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.wechatcloudcontrol.cloudconlogin.getQcCodeDetail")
@ApiOperation("验证二维码是否失效")
public RopResponse<Boolean> getQcCodeDetail(QcCodeRequest qcCodeRequest) {
try {
return RopResponse.success(cloudControlLoginService.getQcCodeDetail(qcCodeRequest));
} catch (RpcServiceException e) {
log.info("=======CloudControlLoginController_getQcCodeDetail_invoke__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.wechatcloudcontrol.cloudconlogin.wechatDepositList")
@ApiOperation("查询托管的员工")
public RopResponse<Pagination<EntmicroStaffResponse>> wechatDepositList(WechatDepositRopRequest wechatDepositRopRequest) {
try {
return RopResponse.success(entimicroStaffService.wechatDepositList(wechatDepositRopRequest));
} catch (RpcServiceException e) {
log.info("=======CloudControlLoginController_wechatDepositList_invoke__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.wechatcloudcontrol.cloudconlogin.wechatDepositNotAccessList")
@ApiOperation("查询非SCRM托管的员工")
public RopResponse<Pagination<EntmicroStaffResponse>> wechatDepositNotAccessList(WechatDepositRopRequest wechatDepositRopRequest) {
try {
return RopResponse.success(entimicroStaffService.wechatDepositNotAccessList(wechatDepositRopRequest));
} catch (RpcServiceException e) {
log.info("=======CloudControlLoginController_wechatDepositNotAccessList_invoke__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
@ServiceMethod(method = "entmicro.api.wechatcloudcontrol.cloudconlogin.getStaffFriends")
@ApiOperation("查询非SCRM托管的员工客户列表")
public RopResponse<Pagination<CustomerInfoResponse>> getStaffFriends(CustomerListRopResquest customerListRopResquest) {
try {
return RopResponse.success(cloudControlLoginService.getStaffFriends(customerListRopResquest));
} catch (RpcServiceException e) {
log.info("=======CloudControlLoginController_getStaffFriends_invoke__exception:{}", e.getMessage());
return RopResponse.error(e.getErrId(), e.getMessage());
}
}
}