🆕 #2181【企业微信】增加支持传入groupId参数的获取企业标签库接口实现
This commit is contained in:
@@ -455,6 +455,20 @@ public interface WxCpExternalContactService {
|
|||||||
*/
|
*/
|
||||||
WxCpUserExternalTagGroupList getCorpTagList(String[] tagId) throws WxErrorException;
|
WxCpUserExternalTagGroupList getCorpTagList(String[] tagId) throws WxErrorException;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
* 企业可通过此接口获取企业客户标签详情。
|
||||||
|
* 若tag_id和group_id均为空,则返回所有标签。
|
||||||
|
* 同时传递tag_id和group_id时,忽略tag_id,仅以group_id作为过滤条件。
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @param tagId the tag id
|
||||||
|
* @param groupId the tagGroup id
|
||||||
|
* @return corp tag list
|
||||||
|
* @throws WxErrorException the wx error exception
|
||||||
|
*/
|
||||||
|
WxCpUserExternalTagGroupList getCorpTagList(String[] tagId, String[] groupId) throws WxErrorException;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* <pre>
|
* <pre>
|
||||||
* 企业可通过此接口向客户标签库中添加新的标签组和标签,每个企业最多可配置3000个企业标签。
|
* 企业可通过此接口向客户标签库中添加新的标签组和标签,每个企业最多可配置3000个企业标签。
|
||||||
|
|||||||
@@ -334,6 +334,20 @@ public class WxCpExternalContactServiceImpl implements WxCpExternalContactServic
|
|||||||
return WxCpUserExternalTagGroupList.fromJson(result);
|
return WxCpUserExternalTagGroupList.fromJson(result);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WxCpUserExternalTagGroupList getCorpTagList(String[] tagId, String[] groupId) throws WxErrorException {
|
||||||
|
JsonObject json = new JsonObject();
|
||||||
|
if (ArrayUtils.isNotEmpty(tagId)) {
|
||||||
|
json.add("tag_id", new Gson().toJsonTree(tagId).getAsJsonArray());
|
||||||
|
}
|
||||||
|
if (ArrayUtils.isNotEmpty(groupId)) {
|
||||||
|
json.add("group_id", new Gson().toJsonTree(groupId).getAsJsonArray());
|
||||||
|
}
|
||||||
|
final String url = this.mainService.getWxCpConfigStorage().getApiUrl(GET_CORP_TAG_LIST);
|
||||||
|
final String result = this.mainService.post(url, json.toString());
|
||||||
|
return WxCpUserExternalTagGroupList.fromJson(result);
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public WxCpUserExternalTagGroupInfo addCorpTag(WxCpUserExternalTagGroupInfo tagGroup) throws WxErrorException {
|
public WxCpUserExternalTagGroupInfo addCorpTag(WxCpUserExternalTagGroupInfo tagGroup) throws WxErrorException {
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user