WeKfClient.java
3.58 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
package com.linkwechat.wecom.client.kf;
import com.dtflys.forest.annotation.*;
import com.linkwechat.wecom.domain.dto.WeResultDto;
import com.linkwechat.wecom.domain.dto.kf.*;
import com.linkwechat.wecom.interceptor.WeAccessTokenInterceptor;
import com.linkwechat.wecom.retry.WeCommonRetryWhen;
/**
* @author danmo
* @description 客服相关接口
* @date 2021/10/9 14:09
**/
@BaseRequest(baseURL = "${weComServerUrl}${weComePrefix}", interceptor = WeAccessTokenInterceptor.class)
@Retry(maxRetryCount = "3", maxRetryInterval = "1000", condition = WeCommonRetryWhen.class)
public interface WeKfClient {
/**
* 添加客服
*
* @param dto in {@link WeKfDto}
* @return {@link WeKfDto}
*/
@Request(url = "/kf/account/add", type = "POST")
public WeKfDto addAccount(@JSONBody WeKfDto dto);
/**
* 删除客服
*
* @param dto in {@link WeKfDto}
* @return {@link WeResultDto}
*/
@Request(url = "/kf/account/del", type = "POST")
public WeResultDto deleteAccount(@JSONBody WeKfDto dto);
/**
* 修改客服信息
*
* @param dto in {@link WeKfDto}
* @return {@link WeResultDto}
*/
@Request(url = "/kf/account/update", type = "POST")
public WeResultDto updateAccount(@JSONBody WeKfDto dto);
/**
* 获取客服帐号列表
*
* @return {@link WeKfListDto}
*/
@Request(url = "/kf/account/list", type = "GET")
public WeKfListDto list();
/**
* 获取客服帐号链接
*
* @param dto in {@link WeKfDto}
* @return {@link WeKfDto}
*/
@Request(url = "/kf/add_contact_way", type = "POST")
public WeKfDto addContactWay(@JSONBody WeKfDto dto);
/**
* 添加接待人员
*
* @param dto in {@link WeKfDto}
* @return {@link WeKfUserListDto}
*/
@Request(url = "/kf/servicer/add", type = "POST")
public WeKfUserListDto addServicer(@JSONBody WeKfDto dto);
/**
* 删除接待人员
*
* @param dto in {@link WeKfDto}
* @return {@link WeKfUserListDto}
*/
@Request(url = "/kf/servicer/del", type = "POST")
public WeKfUserListDto delServicer(@JSONBody WeKfDto dto);
/**
* 获取接待人员列表
*
* @param openKfId 客服id
* @return {@link WeKfUserListDto}
*/
@Request(url = "/kf/servicer/list", type = "GET")
public WeKfUserListDto servicerList(@Query("open_kfid") String openKfId);
/**
* 获取会话状态
*
* @param dto in {@link WeKfDto}
* @return {@link WeKfDto}
*/
@Request(url = "/kf/service_state/get", type = "POST")
public WeKfDto getServiceState(@JSONBody WeKfDto dto);
/**
* 变更会话状态
*
* @param dto in {@link WeKfDto}
* @return {@link WeKfDto}
*/
@Request(url = "/kf/service_state/trans", type = "POST")
public WeKfDto transServiceState(@JSONBody WeKfDto dto);
/**
* 发送消息
*
* @param dto in {@link WeKfMsgDto}
* @return {@link WeKfMsgDto}
*/
@Request(url = "/kf/send_msg", type = "POST")
public WeKfMsgDto sendMsg(@JSONBody WeKfMsgDto dto);
/**
* 读取消息
*
* @param dto in {@link WeKfGetMsgDto}
* @return {@link WeKfGetMsgDto}
*/
@Request(url = "/kf/sync_msg", type = "POST")
public WeKfGetMsgDto syncMsg(@JSONBody WeKfGetMsgDto dto);
/**
* 客户基本信息获取
*
* @param dto in {@link WeKfDto}
* @return {@link WeKfCustomerInfoDto}
*/
@Request(url = "/kf/customer/batchget", type = "POST")
public WeKfCustomerInfoDto getCustomerInfoBatch(@JSONBody WeKfDto dto);
}