2
2
3
3
import lombok .NonNull ;
4
4
import me .chanjar .weixin .common .error .WxErrorException ;
5
- import me .chanjar .weixin .cp .bean .*;
5
+ import me .chanjar .weixin .cp .bean .WxCpBaseResp ;
6
+ import me .chanjar .weixin .cp .bean .external .*;
6
7
7
8
import java .util .Date ;
8
9
import java .util .List ;
@@ -32,8 +33,8 @@ public interface WxCpExternalContactService {
32
33
* </pre>
33
34
*
34
35
* @param info 客户联系「联系我」方式
35
- * @return
36
- * @throws WxErrorException
36
+ * @return wx cp contact way result
37
+ * @throws WxErrorException the wx error exception
37
38
*/
38
39
WxCpContactWayResult addContactWay (@ NonNull WxCpContactWayInfo info ) throws WxErrorException ;
39
40
@@ -45,8 +46,8 @@ public interface WxCpExternalContactService {
45
46
* </pre>
46
47
*
47
48
* @param configId 联系方式的配置id,必填
48
- * @return
49
- * @throws WxErrorException
49
+ * @return contact way
50
+ * @throws WxErrorException the wx error exception
50
51
*/
51
52
WxCpContactWayInfo getContactWay (@ NonNull String configId ) throws WxErrorException ;
52
53
@@ -58,8 +59,8 @@ public interface WxCpExternalContactService {
58
59
* </pre>
59
60
*
60
61
* @param info 客户联系「联系我」方式
61
- * @return
62
- * @throws WxErrorException
62
+ * @return wx cp base resp
63
+ * @throws WxErrorException the wx error exception
63
64
*/
64
65
WxCpBaseResp updateContactWay (@ NonNull WxCpContactWayInfo info ) throws WxErrorException ;
65
66
@@ -71,8 +72,8 @@ public interface WxCpExternalContactService {
71
72
* </pre>
72
73
*
73
74
* @param configId 企业联系方式的配置id,必填
74
- * @return
75
- * @throws WxErrorException
75
+ * @return wx cp base resp
76
+ * @throws WxErrorException the wx error exception
76
77
*/
77
78
WxCpBaseResp deleteContactWay (@ NonNull String configId ) throws WxErrorException ;
78
79
@@ -85,10 +86,10 @@ public interface WxCpExternalContactService {
85
86
* 注意:请保证传入的企业成员和客户之间有仍然有效的临时会话, 通过<b>其他方式的添加外部联系人无法通过此接口关闭会话</b>。
86
87
* </pre>
87
88
*
88
- * @param userId
89
- * @param externalUserId
90
- * @return
91
- * @throws WxErrorException
89
+ * @param userId the user id
90
+ * @param externalUserId the external user id
91
+ * @return wx cp base resp
92
+ * @throws WxErrorException the wx error exception
92
93
*/
93
94
WxCpBaseResp closeTempChat (@ NonNull String userId , @ NonNull String externalUserId ) throws WxErrorException ;
94
95
@@ -103,7 +104,8 @@ public interface WxCpExternalContactService {
103
104
* </pre>
104
105
*
105
106
* @param userId 外部联系人的userid
106
- * @return .
107
+ * @return . external contact
108
+ * @throws WxErrorException the wx error exception
107
109
* @deprecated 建议使用 {@link #getContactDetail(String)}
108
110
*/
109
111
@ Deprecated
@@ -125,7 +127,7 @@ public interface WxCpExternalContactService {
125
127
* </pre>
126
128
*
127
129
* @param userId 外部联系人的userid,注意不是企业成员的帐号
128
- * @return .
130
+ * @return . contact detail
129
131
* @throws WxErrorException .
130
132
*/
131
133
WxCpUserExternalContactInfo getContactDetail (String userId ) throws WxErrorException ;
@@ -167,21 +169,21 @@ public interface WxCpExternalContactService {
167
169
/**
168
170
* 企业和第三方可通过此接口,获取所有离职成员的客户列表,并可进一步调用离职成员的外部联系人再分配接口将这些客户重新分配给其他企业成员。
169
171
*
170
- * @param page
171
- * @param pageSize
172
- * @return
173
- * @throws WxErrorException
172
+ * @param page the page
173
+ * @param pageSize the page size
174
+ * @return wx cp user external unassign list
175
+ * @throws WxErrorException the wx error exception
174
176
*/
175
177
WxCpUserExternalUnassignList listUnassignedList (Integer page , Integer pageSize ) throws WxErrorException ;
176
178
177
179
/**
178
180
* 企业可通过此接口,将已离职成员的外部联系人分配给另一个成员接替联系。
179
181
*
180
- * @param externalUserid
181
- * @param handOverUserid
182
- * @param takeOverUserid
183
- * @return
184
- * @throws WxErrorException
182
+ * @param externalUserid the external userid
183
+ * @param handOverUserid the hand over userid
184
+ * @param takeOverUserid the take over userid
185
+ * @return wx cp base resp
186
+ * @throws WxErrorException the wx error exception
185
187
*/
186
188
WxCpBaseResp transferExternalContact (String externalUserid , String handOverUserid , String takeOverUserid ) throws WxErrorException ;
187
189
@@ -192,6 +194,14 @@ public interface WxCpExternalContactService {
192
194
* 暂不支持第三方调用。
193
195
* 微信文档:https://work.weixin.qq.com/api/doc/90000/90135/92119
194
196
* </pre>
197
+ *
198
+ * @param pageIndex the page index
199
+ * @param pageSize the page size
200
+ * @param status the status
201
+ * @param userIds the user ids
202
+ * @param partyIds the party ids
203
+ * @return the wx cp user external group chat list
204
+ * @throws WxErrorException the wx error exception
195
205
*/
196
206
WxCpUserExternalGroupChatList listGroupChat (Integer pageIndex , Integer pageSize , int status , String [] userIds , String [] partyIds ) throws WxErrorException ;
197
207
@@ -203,9 +213,9 @@ public interface WxCpExternalContactService {
203
213
* 微信文档:https://work.weixin.qq.com/api/doc/90000/90135/92122
204
214
* </pre>
205
215
*
206
- * @param chatId
207
- * @return
208
- * @throws WxErrorException
216
+ * @param chatId the chat id
217
+ * @return group chat
218
+ * @throws WxErrorException the wx error exception
209
219
*/
210
220
WxCpUserExternalGroupChatInfo getGroupChat (String chatId ) throws WxErrorException ;
211
221
@@ -217,12 +227,12 @@ public interface WxCpExternalContactService {
217
227
* 第三方/自建应用调用时传入的userid和partyid要在应用的可见范围内;
218
228
* </pre>
219
229
*
220
- * @param startTime
221
- * @param endTime
222
- * @param userIds
223
- * @param partyIds
224
- * @return
225
- * @throws WxErrorException
230
+ * @param startTime the start time
231
+ * @param endTime the end time
232
+ * @param userIds the user ids
233
+ * @param partyIds the party ids
234
+ * @return user behavior statistic
235
+ * @throws WxErrorException the wx error exception
226
236
*/
227
237
WxCpUserExternalUserBehaviorStatistic getUserBehaviorStatistic (Date startTime , Date endTime , String [] userIds , String [] partyIds ) throws WxErrorException ;
228
238
@@ -233,74 +243,117 @@ public interface WxCpExternalContactService {
233
243
* 暂不支持第三方调用。
234
244
* </pre>
235
245
*
236
- * @param startTime
237
- * @param orderBy
238
- * @param orderAsc
239
- * @param pageIndex
240
- * @param pageSize
241
- * @param userIds
242
- * @param partyIds
243
- * @return
244
- * @throws WxErrorException
246
+ * @param startTime the start time
247
+ * @param orderBy the order by
248
+ * @param orderAsc the order asc
249
+ * @param pageIndex the page index
250
+ * @param pageSize the page size
251
+ * @param userIds the user ids
252
+ * @param partyIds the party ids
253
+ * @return group chat statistic
254
+ * @throws WxErrorException the wx error exception
245
255
*/
246
256
WxCpUserExternalGroupChatStatistic getGroupChatStatistic (Date startTime , Integer orderBy , Integer orderAsc , Integer pageIndex , Integer pageSize , String [] userIds , String [] partyIds ) throws WxErrorException ;
247
257
258
+ /**
259
+ * 添加企业群发消息任务
260
+ * 企业可通过此接口添加企业群发消息的任务并通知客服人员发送给相关客户或客户群。(注:企业微信终端需升级到2.7.5版本及以上)
261
+ * 注意:调用该接口并不会直接发送消息给客户/客户群,需要相关的客服人员操作以后才会实际发送(客服人员的企业微信需要升级到2.7.5及以上版本)
262
+ * 同一个企业每个自然月内仅可针对一个客户/客户群发送4条消息,超过限制的用户将会被忽略。
263
+ * <p>
264
+ * 请求方式: POST(HTTP)
265
+ * <p>
266
+ * 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/add_msg_template?access_token=ACCESS_TOKEN
267
+ * <p>
268
+ * 文档地址:https://work.weixin.qq.com/api/doc/90000/90135/92135
269
+ *
270
+ * @param wxCpMsgTemplate the wx cp msg template
271
+ * @return the wx cp msg template add result
272
+ * @throws WxErrorException the wx error exception
273
+ */
248
274
WxCpMsgTemplateAddResult addMsgTemplate (WxCpMsgTemplate wxCpMsgTemplate ) throws WxErrorException ;
249
275
276
+ /**
277
+ * 发送新客户欢迎语
278
+ * <pre>
279
+ * 企业微信在向企业推送添加外部联系人事件时,会额外返回一个welcome_code,企业以此为凭据调用接口,即可通过成员向新添加的客户发送个性化的欢迎语。
280
+ * 为了保证用户体验以及避免滥用,企业仅可在收到相关事件后20秒内调用,且只可调用一次。
281
+ * 如果企业已经在管理端为相关成员配置了可用的欢迎语,则推送添加外部联系人事件时不会返回welcome_code。
282
+ * 每次添加新客户时可能有多个企业自建应用/第三方应用收到带有welcome_code的回调事件,但仅有最先调用的可以发送成功。后续调用将返回41051(externaluser has started chatting)错误,请用户根据实际使用需求,合理设置应用可见范围,避免冲突。
283
+ * 请求方式: POST(HTTP)
284
+ *
285
+ * 请求地址:https://qyapi.weixin.qq.com/cgi-bin/externalcontact/send_welcome_msg?access_token=ACCESS_TOKEN
286
+ *
287
+ * 文档地址:https://work.weixin.qq.com/api/doc/90000/90135/92137
288
+ * </pre>
289
+ *
290
+ * @param msg .
291
+ * @throws WxErrorException .
292
+ */
293
+ void sendWelcomeMsg (WxCpWelcomeMsg msg ) throws WxErrorException ;
250
294
251
295
/**
252
296
* <pre>
253
297
* 企业可通过此接口获取企业客户标签详情。
254
298
* </pre>
255
- * @param tagId
256
- * @return
299
+ *
300
+ * @param tagId the tag id
301
+ * @return corp tag list
302
+ * @throws WxErrorException the wx error exception
257
303
*/
258
- WxCpUserExternalTagGroupList getCorpTagList (String [] tagId ) throws WxErrorException ;
259
-
304
+ WxCpUserExternalTagGroupList getCorpTagList (String [] tagId ) throws WxErrorException ;
260
305
261
306
/**
262
307
* <pre>
263
308
* 企业可通过此接口向客户标签库中添加新的标签组和标签,每个企业最多可配置3000个企业标签。
264
309
* 暂不支持第三方调用。
265
310
* </pre>
266
- * @param tagGroup
267
- * @return
311
+ *
312
+ * @param tagGroup the tag group
313
+ * @return wx cp user external tag group info
314
+ * @throws WxErrorException the wx error exception
268
315
*/
269
- WxCpUserExternalTagGroupInfo addCorpTag (WxCpUserExternalTagGroupInfo tagGroup )throws WxErrorException ;
316
+ WxCpUserExternalTagGroupInfo addCorpTag (WxCpUserExternalTagGroupInfo tagGroup ) throws WxErrorException ;
270
317
271
318
/**
272
319
* <pre>
273
320
* 企业可通过此接口编辑客户标签/标签组的名称或次序值。
274
321
* 暂不支持第三方调用。
275
322
* </pre>
276
- * @param id
277
- * @param name
278
- * @param order
279
- * @return
323
+ *
324
+ * @param id the id
325
+ * @param name the name
326
+ * @param order the order
327
+ * @return wx cp base resp
328
+ * @throws WxErrorException the wx error exception
280
329
*/
281
- WxCpBaseResp editCorpTag (String id ,String name ,Integer order )throws WxErrorException ;
330
+ WxCpBaseResp editCorpTag (String id , String name , Integer order ) throws WxErrorException ;
282
331
283
332
/**
284
333
* <pre>
285
334
* 企业可通过此接口删除客户标签库中的标签,或删除整个标签组。
286
335
* 暂不支持第三方调用。
287
336
* </pre>
288
- * @param tagId
289
- * @param groupId
290
- * @return
337
+ *
338
+ * @param tagId the tag id
339
+ * @param groupId the group id
340
+ * @return wx cp base resp
341
+ * @throws WxErrorException the wx error exception
291
342
*/
292
- WxCpBaseResp delCorpTag (String [] tagId ,String [] groupId )throws WxErrorException ;
343
+ WxCpBaseResp delCorpTag (String [] tagId , String [] groupId ) throws WxErrorException ;
293
344
294
345
/**
295
346
* <pre>
296
347
* 企业可通过此接口为指定成员的客户添加上由企业统一配置的标签。
297
348
* https://work.weixin.qq.com/api/doc/90000/90135/92117
298
349
* </pre>
299
- * @param userid
300
- * @param externalUserid
301
- * @param addTag
302
- * @param removeTag
303
- * @return
350
+ *
351
+ * @param userid the userid
352
+ * @param externalUserid the external userid
353
+ * @param addTag the add tag
354
+ * @param removeTag the remove tag
355
+ * @return wx cp base resp
356
+ * @throws WxErrorException the wx error exception
304
357
*/
305
- WxCpBaseResp markTag (String userid ,String externalUserid ,String [] addTag ,String [] removeTag )throws WxErrorException ;
358
+ WxCpBaseResp markTag (String userid , String externalUserid , String [] addTag , String [] removeTag ) throws WxErrorException ;
306
359
}
0 commit comments