18
18
*/
19
19
public interface WxCpTagService {
20
20
21
+ /**
22
+ * 创建标签.
23
+ * <pre>
24
+ * 请求地址:https://qyapi.weixin.qq.com/cgi-bin/tag/create?access_token=ACCESS_TOKEN
25
+ * 文档地址:https://work.weixin.qq.com/api/doc#90000/90135/90210
26
+ * </pre>
27
+ *
28
+ * @param name 标签名称,长度限制为32个字以内(汉字或英文字母),标签名不可与其他标签重名。
29
+ * @param id 标签id,非负整型,指定此参数时新增的标签会生成对应的标签id,不指定时则以目前最大的id自增。
30
+ * @return 标签id
31
+ * @throws WxErrorException .
32
+ */
33
+ String create (String name , Integer id ) throws WxErrorException ;
34
+
21
35
/**
22
36
* 创建标签.
23
37
*
24
38
* @param tagName 标签名
39
+ * @return 标签id
40
+ * @throws WxErrorException .
41
+ * @deprecated 建议使用 {@link #create(String, Integer)},其中后面的参数可以为空
25
42
*/
43
+ @ Deprecated
26
44
String create (String tagName ) throws WxErrorException ;
27
45
28
46
/**
29
47
* 更新标签.
30
48
*
31
49
* @param tagId 标签id
32
50
* @param tagName 标签名
51
+ * @throws WxErrorException .
33
52
*/
34
53
void update (String tagId , String tagName ) throws WxErrorException ;
35
54
36
55
/**
37
56
* 删除标签.
38
57
*
39
58
* @param tagId 标签id
59
+ * @throws WxErrorException .
40
60
*/
41
61
void delete (String tagId ) throws WxErrorException ;
42
62
43
63
/**
44
64
* 获得标签列表.
65
+ *
66
+ * @return 标签列表
67
+ * @throws WxErrorException .
45
68
*/
46
69
List <WxCpTag > listAll () throws WxErrorException ;
47
70
48
71
/**
49
72
* 获取标签成员.
50
73
*
51
74
* @param tagId 标签ID
75
+ * @return 成员列表
76
+ * @throws WxErrorException .
52
77
*/
53
78
List <WxCpUser > listUsersByTagId (String tagId ) throws WxErrorException ;
54
79
@@ -57,6 +82,8 @@ public interface WxCpTagService {
57
82
* 对应: http://qydev.weixin.qq.com/wiki/index.php?title=管理标签 中的get接口
58
83
*
59
84
* @param tagId 标签id
85
+ * @return .
86
+ * @throws WxErrorException .
60
87
*/
61
88
WxCpTagGetResult get (String tagId ) throws WxErrorException ;
62
89
@@ -66,6 +93,8 @@ public interface WxCpTagService {
66
93
* @param tagId 标签id
67
94
* @param userIds 用户ID 列表
68
95
* @param partyIds 企业部门ID列表
96
+ * @return .
97
+ * @throws WxErrorException .
69
98
*/
70
99
WxCpTagAddOrRemoveUsersResult addUsers2Tag (String tagId , List <String > userIds , List <String > partyIds ) throws WxErrorException ;
71
100
@@ -75,6 +104,8 @@ public interface WxCpTagService {
75
104
* @param tagId 标签id
76
105
* @param userIds 用户id列表
77
106
* @param partyIds 企业部门ID列表
107
+ * @return .
108
+ * @throws WxErrorException .
78
109
*/
79
110
WxCpTagAddOrRemoveUsersResult removeUsersFromTag (String tagId , List <String > userIds , List <String > partyIds ) throws WxErrorException ;
80
111
0 commit comments