Young пре 2 година
родитељ
комит
ce8e791d2a

+ 1 - 1
support-demo/pom.xml

@@ -36,7 +36,7 @@
 
         <dependency>
             <groupId>cn.nosum</groupId>
-            <artifactId>wx-java-cp</artifactId>
+            <artifactId>wx-java-cp-start</artifactId>
             <version>1.0-SNAPSHOT</version>
         </dependency>
 

+ 4 - 6
support-demo/src/main/java/cn/nosum/wx/cp/controller/MediaController.java

@@ -6,18 +6,16 @@ import cn.nosum.http.entity.UploadRequest;
 import cn.nosum.wx.common.api.WxConsts;
 import cn.nosum.wx.common.entity.result.WxMediaUploadResult;
 import cn.nosum.wx.common.error.WxErrorException;
-import cn.nosum.wx.cp.api.WxCpMediaService;
-import cn.nosum.wx.cp.api.WxCpService;
 import cn.nosum.wx.cp.config.WxCpConfiguration;
 import lombok.SneakyThrows;
-import org.apache.tomcat.util.http.fileupload.IOUtils;
-import org.springframework.context.support.ClassPathXmlApplicationContext;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RestController;
 import org.springframework.web.multipart.MultipartFile;
 
-import java.io.*;
-import java.net.URLEncoder;
+import java.io.ByteArrayInputStream;
+import java.io.ByteArrayOutputStream;
+import java.io.FileOutputStream;
+import java.io.IOException;
 
 /**
  * 素材管理.

+ 13 - 3
support-http/src/main/java/cn/nosum/http/enums/HttpType.java

@@ -1,21 +1,31 @@
 package cn.nosum.http.enums;
 
+import lombok.Getter;
+
 /**
  * HTTP 客户端类型.
  *
  * @author Young
  */
+@Getter
 public enum HttpType {
     /**
      * jodd-http.
      */
-    JODD_HTTP,
+    JODD_HTTP("jood"),
     /**
      * apache httpclient.
      */
-    APACHE_HTTP,
+    APACHE_HTTP("apache"),
     /**
      * okhttp.
      */
-    OK_HTTP
+    OK_HTTP("ok_http"),
+    ;
+
+    HttpType(String name) {
+        this.name = name;
+    }
+
+    private String name;
 }

+ 1 - 0
wx-java-tools/pom.xml

@@ -14,6 +14,7 @@
     <modules>
         <module>wx-java-common</module>
         <module>wx-java-cp</module>
+        <module>wx-java-cp-start</module>
     </modules>
 
     <dependencies>

+ 30 - 0
wx-java-tools/wx-java-cp-start/pom.xml

@@ -0,0 +1,30 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+    <parent>
+        <artifactId>wx-java-tools</artifactId>
+        <groupId>cn.nosum</groupId>
+        <version>1.0-SNAPSHOT</version>
+    </parent>
+    <modelVersion>4.0.0</modelVersion>
+
+    <artifactId>wx-java-cp-start</artifactId>
+
+
+    <dependencies>
+        <dependency>
+            <groupId>cn.nosum</groupId>
+            <artifactId>wx-java-cp</artifactId>
+            <version>1.0-SNAPSHOT</version>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-starter</artifactId>
+        </dependency>
+        <dependency>
+            <groupId>org.springframework.boot</groupId>
+            <artifactId>spring-boot-configuration-processor</artifactId>
+        </dependency>
+    </dependencies>
+</project>

support-demo/src/main/java/cn/nosum/wx/cp/config/WxCpAppConfig.java → wx-java-tools/wx-java-cp-start/src/main/java/cn/nosum/wx/cp/config/WxCpAppConfig.java


+ 24 - 4
support-demo/src/main/java/cn/nosum/wx/cp/config/WxCpConfiguration.java

@@ -1,10 +1,13 @@
 package cn.nosum.wx.cp.config;
 
+import cn.nosum.http.enums.HttpType;
 import cn.nosum.wx.cp.api.WxCpService;
 import cn.nosum.wx.cp.api.impl.WxCpServiceApacheHttpClientImpl;
+import cn.nosum.wx.cp.api.impl.WxCpServiceJoddHttpImpl;
+import cn.nosum.wx.cp.api.impl.WxCpServiceOkHttpImpl;
 import cn.nosum.wx.cp.config.impl.WxCpDefaultConfigImpl;
-import lombok.Data;
 import lombok.val;
+import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.boot.context.properties.EnableConfigurationProperties;
 import org.springframework.context.annotation.Configuration;
@@ -39,15 +42,32 @@ public class WxCpConfiguration {
             configStorage.setAesKey(agent.getAesKey());
 
             // 设置代理对象
-            WxCpHttpProxyConfig proxy = properties.getProxy();
-            if (proxy.isEnabled()){
+            WxCpHttpProxyConfig proxy = properties.getHttp().getProxy();
+            if (proxy.isEnabled()) {
                 configStorage.setHttpProxyHost(proxy.getHost());
                 configStorage.setHttpProxyPort(proxy.getPort());
                 configStorage.setHttpProxyUsername(proxy.getUserName());
                 configStorage.setHttpProxyPassword(proxy.getPassword());
             }
+            WxCpService service = null;
+
+            String type = properties.getHttp().getType();
+            if (StringUtils.isNotBlank(type)) {
+                if (type.equals(HttpType.APACHE_HTTP.getName())) {
+                    service = new WxCpServiceApacheHttpClientImpl();
+                }
+                if (type.equals(HttpType.JODD_HTTP.getName())) {
+                    service = new WxCpServiceJoddHttpImpl();
+                }
+                if (type.equals(HttpType.OK_HTTP.getName())) {
+                    service = new WxCpServiceOkHttpImpl();
+                }
+            }
+
+            if (service == null) {
+                service = new WxCpServiceApacheHttpClientImpl();
+            }
 
-            val service = new WxCpServiceApacheHttpClientImpl();
             service.setWxCpConfigStorage(configStorage);
             return service;
         }).collect(Collectors.toMap(service -> service.getWxCpConfigStorage().getAgentId(), a -> a));

+ 22 - 0
wx-java-tools/wx-java-cp-start/src/main/java/cn/nosum/wx/cp/config/WxCpHttpConfig.java

@@ -0,0 +1,22 @@
+package cn.nosum.wx.cp.config;
+
+import lombok.Data;
+
+/**
+ * 企业微信 HTTP 请求配置.
+ *
+ * @author Young
+ */
+@Data
+public class WxCpHttpConfig {
+
+    /**
+     * 请求类型
+     */
+    private String type;
+
+    /**
+     * 代理配置
+     */
+    private WxCpHttpProxyConfig proxy;
+}

support-demo/src/main/java/cn/nosum/wx/cp/config/WxCpHttpProxyConfig.java → wx-java-tools/wx-java-cp-start/src/main/java/cn/nosum/wx/cp/config/WxCpHttpProxyConfig.java


+ 2 - 2
support-demo/src/main/java/cn/nosum/wx/cp/config/WxCpMultiAppConfig.java

@@ -22,9 +22,9 @@ public class WxCpMultiAppConfig {
     private String corpId;
 
     /**
-     * 企微微信 HTTP 接口请求代理配置
+     * 企微微信 HTTP 接口请求配置
      */
-    private WxCpHttpProxyConfig proxy;
+    private WxCpHttpConfig http;
 
     /**
      * 应用配置列表

+ 2 - 0
wx-java-tools/wx-java-cp-start/src/main/resources/META-INF/spring.factories

@@ -0,0 +1,2 @@
+org.springframework.boot.autoconfigure.EnableAutoConfiguration=\
+  cn.nosum.wx.cp.config.WxCpConfiguration

+ 35 - 72
wx-java-tools/wx-java-cp/src/main/java/cn/nosum/wx/cp/api/WxCpExternalContactService.java

@@ -34,9 +34,8 @@ public interface WxCpExternalContactService {
      *
      * @param info 客户联系「联系我」方式
      * @return wx cp contact way result
-     * @throws WxErrorException the wx error exception
      */
-    WxCpContactWayResult addContactWay(@NonNull WxCpContactWayInfo info) throws WxErrorException;
+    WxCpContactWayResult addContactWay(@NonNull WxCpContactWayInfo info);
 
     /**
      * 获取企业已配置的「联系我」方式
@@ -47,9 +46,8 @@ public interface WxCpExternalContactService {
      *
      * @param configId 联系方式的配置id,必填
      * @return contact way
-     * @throws WxErrorException the wx error exception
      */
-    WxCpContactWayInfo getContactWay(@NonNull String configId) throws WxErrorException;
+    WxCpContactWayInfo getContactWay(@NonNull String configId);
 
     /**
      * 更新企业已配置的「联系我」方式
@@ -60,9 +58,8 @@ public interface WxCpExternalContactService {
      *
      * @param info 客户联系「联系我」方式
      * @return wx cp base resp
-     * @throws WxErrorException the wx error exception
      */
-    WxCpBaseResp updateContactWay(@NonNull WxCpContactWayInfo info) throws WxErrorException;
+    WxCpBaseResp updateContactWay(@NonNull WxCpContactWayInfo info);
 
     /**
      * 删除企业已配置的「联系我」方式
@@ -73,9 +70,8 @@ public interface WxCpExternalContactService {
      *
      * @param configId 企业联系方式的配置id,必填
      * @return wx cp base resp
-     * @throws WxErrorException the wx error exception
      */
-    WxCpBaseResp deleteContactWay(@NonNull String configId) throws WxErrorException;
+    WxCpBaseResp deleteContactWay(@NonNull String configId);
 
     /**
      * 结束临时会话
@@ -89,9 +85,8 @@ public interface WxCpExternalContactService {
      * @param userId         the user id
      * @param externalUserId the external user id
      * @return wx cp base resp
-     * @throws WxErrorException the wx error exception
      */
-    WxCpBaseResp closeTempChat(@NonNull String userId, @NonNull String externalUserId) throws WxErrorException;
+    WxCpBaseResp closeTempChat(@NonNull String userId, @NonNull String externalUserId);
 
 
     /**
@@ -105,11 +100,10 @@ public interface WxCpExternalContactService {
      *
      * @param userId 外部联系人的userid
      * @return . external contact
-     * @throws WxErrorException the wx error exception
      * @deprecated 建议使用 {@link #getContactDetail(String)}
      */
     @Deprecated
-    WxCpExternalContactInfo getExternalContact(String userId) throws WxErrorException;
+    WxCpExternalContactInfo getExternalContact(String userId);
 
     /**
      * 获取客户详情.
@@ -127,19 +121,16 @@ public interface WxCpExternalContactService {
      * </pre>
      *
      * @param userId 外部联系人的userid,注意不是企业成员的帐号
-     * @return . contact detail
-     * @throws WxErrorException .
      */
-    WxCpExternalContactInfo getContactDetail(String userId) throws WxErrorException;
+    WxCpExternalContactInfo getContactDetail(String userId);
 
     /**
      * 企业和服务商可通过此接口,将微信外部联系人的userid转为微信openid,用于调用支付相关接口。暂不支持企业微信外部联系人(ExternalUserid为wo开头)的userid转openid。
      *
      * @param externalUserid 微信外部联系人的userid
      * @return 该企业的外部联系人openid
-     * @throws WxErrorException .
      */
-    String convertToOpenid(String externalUserid) throws WxErrorException;
+    String convertToOpenid(String externalUserid);
 
     /**
      * 服务商为企业代开发微信小程序的场景,服务商可通过此接口,将微信客户的unionid转为external_userid。
@@ -160,9 +151,8 @@ public interface WxCpExternalContactService {
      *
      * @param unionid 微信客户的unionid
      * @return 该企业的外部联系人ID
-     * @throws WxErrorException .
      */
-    String unionidToExternalUserid(String unionid) throws WxErrorException;
+    String unionidToExternalUserid(String unionid);
 
     /**
      * 批量获取客户详情.
@@ -182,12 +172,10 @@ public interface WxCpExternalContactService {
      * @param userIdList 企业成员的userid列表,注意不是外部联系人的帐号
      * @param cursor     the cursor
      * @param limit      the  limit
-     * @return wx cp user external contact batch info
-     * @throws WxErrorException .
      */
     WxCpExternalContactBatchInfo getContactDetailBatch(String[] userIdList, String cursor,
                                                        Integer limit)
-            throws WxErrorException;
+    ;
 
     /**
      * 修改客户备注信息.
@@ -199,9 +187,8 @@ public interface WxCpExternalContactService {
      * </pre>
      *
      * @param request 备注信息请求
-     * @throws WxErrorException .
      */
-    void updateRemark(WxCpUpdateRemarkRequest request) throws WxErrorException;
+    void updateRemark(WxCpUpdateRemarkRequest request);
 
     /**
      * 获取客户列表.
@@ -219,10 +206,8 @@ public interface WxCpExternalContactService {
      * </pre>
      *
      * @param userId 企业成员的userid
-     * @return List of External wx id
-     * @throws WxErrorException .
      */
-    List<String> listExternalContacts(String userId) throws WxErrorException;
+    List<String> listExternalContacts(String userId);
 
     /**
      * 企业和第三方服务商可通过此接口获取配置了客户联系功能的成员(Customer Contact)列表。
@@ -231,11 +216,8 @@ public interface WxCpExternalContactService {
      *   第三方应用需拥有“企业客户”权限。
      *   第三方应用只能获取到可见范围内的配置了客户联系功能的成员
      * </pre>
-     *
-     * @return List of CpUser id
-     * @throws WxErrorException .
      */
-    List<String> listFollowers() throws WxErrorException;
+    List<String> listFollowers();
 
     /**
      * 企业和第三方可通过此接口,获取所有离职成员的客户列表,并可进一步调用离职成员的外部联系人再分配接口将这些客户重新分配给其他企业成员。
@@ -243,9 +225,8 @@ public interface WxCpExternalContactService {
      * @param page     the page
      * @param pageSize the page size
      * @return wx cp user external unassign list
-     * @throws WxErrorException the wx error exception
      */
-    WxCpUserExternalUnassignList listUnassignedList(Integer page, Integer pageSize) throws WxErrorException;
+    WxCpUserExternalUnassignList listUnassignedList(Integer page, Integer pageSize);
 
     /**
      * 企业可通过此接口,将已离职成员的外部联系人分配给另一个成员接替联系。
@@ -254,11 +235,10 @@ public interface WxCpExternalContactService {
      * @param handOverUserid the hand over userid
      * @param takeOverUserid the take over userid
      * @return wx cp base resp
-     * @throws WxErrorException the wx error exception
      * @deprecated 此后续将不再更新维护, 建议使用 {@link #transferCustomer(WxCpUserTransferCustomerReq)}
      */
     @Deprecated
-    WxCpBaseResp transferExternalContact(String externalUserid, String handOverUserid, String takeOverUserid) throws WxErrorException;
+    WxCpBaseResp transferExternalContact(String externalUserid, String handOverUserid, String takeOverUserid);
 
     /**
      * 企业可通过此接口,转接在职成员的客户给其他成员。
@@ -276,9 +256,8 @@ public interface WxCpExternalContactService {
      *
      * @param req 转接在职成员的客户给其他成员请求实体
      * @return wx cp base resp
-     * @throws WxErrorException the wx error exception
      */
-    WxCpUserTransferCustomerResp transferCustomer(WxCpUserTransferCustomerReq req) throws WxErrorException;
+    WxCpUserTransferCustomerResp transferCustomer(WxCpUserTransferCustomerReq req);
 
     /**
      * 企业和第三方可通过此接口查询在职成员的客户转接情况。
@@ -294,9 +273,8 @@ public interface WxCpExternalContactService {
      * @param takeOverUserid 接替成员的userid
      * @param cursor         分页查询的cursor,每个分页返回的数据不会超过1000条;不填或为空表示获取第一个分页;
      * @return 客户转接接口实体
-     * @throws WxErrorException the wx error exception
      */
-    WxCpUserTransferResultResp transferResult(@NotNull String handOverUserid, @NotNull String takeOverUserid, String cursor) throws WxErrorException;
+    WxCpUserTransferResultResp transferResult(@NotNull String handOverUserid, @NotNull String takeOverUserid, String cursor);
 
     /**
      * 企业可通过此接口,分配离职成员的客户给其他成员。
@@ -316,9 +294,8 @@ public interface WxCpExternalContactService {
      *
      * @param req 转接在职成员的客户给其他成员请求实体
      * @return wx cp base resp
-     * @throws WxErrorException the wx error exception
      */
-    WxCpUserTransferCustomerResp resignedTransferCustomer(WxCpUserTransferCustomerReq req) throws WxErrorException;
+    WxCpUserTransferCustomerResp resignedTransferCustomer(WxCpUserTransferCustomerReq req);
 
     /**
      * 企业和第三方可通过此接口查询离职成员的客户分配情况。
@@ -334,9 +311,8 @@ public interface WxCpExternalContactService {
      * @param takeOverUserid 接替成员的userid
      * @param cursor         分页查询的cursor,每个分页返回的数据不会超过1000条;不填或为空表示获取第一个分页;
      * @return 客户转接接口实体
-     * @throws WxErrorException the wx error exception
      */
-    WxCpUserTransferResultResp resignedTransferResult(@NotNull String handOverUserid, @NotNull String takeOverUserid, String cursor) throws WxErrorException;
+    WxCpUserTransferResultResp resignedTransferResult(@NotNull String handOverUserid, @NotNull String takeOverUserid, String cursor);
 
     /**
      * <pre>
@@ -352,11 +328,10 @@ public interface WxCpExternalContactService {
      * @param userIds   the user ids
      * @param partyIds  the party ids
      * @return the wx cp user external group chat list
-     * @throws WxErrorException the wx error exception
      * @deprecated 请使用 {@link WxCpExternalContactService#listGroupChat(Integer, String, int, String[])}
      */
     @Deprecated
-    WxCpUserExternalGroupChatList listGroupChat(Integer pageIndex, Integer pageSize, int status, String[] userIds, String[] partyIds) throws WxErrorException;
+    WxCpUserExternalGroupChatList listGroupChat(Integer pageIndex, Integer pageSize, int status, String[] userIds, String[] partyIds);
 
     /**
      * <pre>
@@ -371,9 +346,9 @@ public interface WxCpExternalContactService {
      * @param status  客户群跟进状态过滤。0 - 所有列表(即不过滤)  1 - 离职待继承  2 - 离职继承中  3 - 离职继承完成 默认为0
      * @param userIds 群主过滤。如果不填,表示获取应用可见范围内全部群主的数据(但是不建议这么用,如果可见范围人数超过1000人,为了防止数据包过大,会报错 81017);用户ID列表。最多100个
      * @return the wx cp user external group chat list
-     * @throws WxErrorException the wx error exception
+     * @ the wx error exception
      */
-    WxCpUserExternalGroupChatList listGroupChat(Integer limit, String cursor, int status, String[] userIds) throws WxErrorException;
+    WxCpUserExternalGroupChatList listGroupChat(Integer limit, String cursor, int status, String[] userIds);
 
     /**
      * <pre>
@@ -385,9 +360,8 @@ public interface WxCpExternalContactService {
      *
      * @param chatId the chat id
      * @return group chat
-     * @throws WxErrorException the wx error exception
      */
-    WxCpUserExternalGroupChatInfo getGroupChat(String chatId, Integer needName) throws WxErrorException;
+    WxCpUserExternalGroupChatInfo getGroupChat(String chatId, Integer needName);
 
     /**
      * 企业可通过此接口,将已离职成员为群主的群,分配给另一个客服成员。
@@ -411,9 +385,8 @@ public interface WxCpExternalContactService {
      * @param chatIds  需要转群主的客户群ID列表。取值范围: 1 ~ 100
      * @param newOwner 新群主ID
      * @return 分配结果,主要是分配失败的群列表
-     * @throws WxErrorException the wx error exception
      */
-    WxCpUserExternalGroupChatTransferResp transferGroupChat(String[] chatIds, String newOwner) throws WxErrorException;
+    WxCpUserExternalGroupChatTransferResp transferGroupChat(String[] chatIds, String newOwner);
 
     /**
      * <pre>
@@ -428,9 +401,8 @@ public interface WxCpExternalContactService {
      * @param userIds   the user ids
      * @param partyIds  the party ids
      * @return user behavior statistic
-     * @throws WxErrorException the wx error exception
      */
-    WxCpUserExternalUserBehaviorStatistic getUserBehaviorStatistic(Date startTime, Date endTime, String[] userIds, String[] partyIds) throws WxErrorException;
+    WxCpUserExternalUserBehaviorStatistic getUserBehaviorStatistic(Date startTime, Date endTime, String[] userIds, String[] partyIds);
 
     /**
      * <pre>
@@ -447,9 +419,8 @@ public interface WxCpExternalContactService {
      * @param userIds   the user ids
      * @param partyIds  the party ids
      * @return group chat statistic
-     * @throws WxErrorException the wx error exception
      */
-    WxCpUserExternalGroupChatStatistic getGroupChatStatistic(Date startTime, Integer orderBy, Integer orderAsc, Integer pageIndex, Integer pageSize, String[] userIds, String[] partyIds) throws WxErrorException;
+    WxCpUserExternalGroupChatStatistic getGroupChatStatistic(Date startTime, Integer orderBy, Integer orderAsc, Integer pageIndex, Integer pageSize, String[] userIds, String[] partyIds);
 
     /**
      * 添加企业群发消息任务
@@ -465,9 +436,9 @@ public interface WxCpExternalContactService {
      *
      * @param wxCpMsgTemplate the wx cp msg template
      * @return the wx cp msg template add result
-     * @throws WxErrorException the wx error exception
+     * @ the wx error exception
      */
-    WxCpMsgTemplateAddResult addMsgTemplate(WxCpMsgTemplate wxCpMsgTemplate) throws WxErrorException;
+    WxCpMsgTemplateAddResult addMsgTemplate(WxCpMsgTemplate wxCpMsgTemplate);
 
     /**
      * 发送新客户欢迎语
@@ -484,9 +455,8 @@ public interface WxCpExternalContactService {
      * </pre>
      *
      * @param msg .
-     * @throws WxErrorException .
      */
-    void sendWelcomeMsg(WxCpWelcomeMsg msg) throws WxErrorException;
+    void sendWelcomeMsg(WxCpWelcomeMsg msg);
 
     /**
      * <pre>
@@ -495,9 +465,8 @@ public interface WxCpExternalContactService {
      *
      * @param tagId the tag id
      * @return corp tag list
-     * @throws WxErrorException the wx error exception
      */
-    WxCpUserExternalTagGroupList getCorpTagList(String[] tagId) throws WxErrorException;
+    WxCpUserExternalTagGroupList getCorpTagList(String[] tagId);
 
     /**
      * <pre>
@@ -509,9 +478,8 @@ public interface WxCpExternalContactService {
      * @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;
+    WxCpUserExternalTagGroupList getCorpTagList(String[] tagId, String[] groupId);
 
     /**
      * <pre>
@@ -521,9 +489,8 @@ public interface WxCpExternalContactService {
      *
      * @param tagGroup the tag group
      * @return wx cp user external tag group info
-     * @throws WxErrorException the wx error exception
      */
-    WxCpUserExternalTagGroupInfo addCorpTag(WxCpUserExternalTagGroupInfo tagGroup) throws WxErrorException;
+    WxCpUserExternalTagGroupInfo addCorpTag(WxCpUserExternalTagGroupInfo tagGroup);
 
     /**
      * <pre>
@@ -535,9 +502,8 @@ public interface WxCpExternalContactService {
      * @param name  the name
      * @param order the order
      * @return wx cp base resp
-     * @throws WxErrorException the wx error exception
      */
-    WxCpBaseResp editCorpTag(String id, String name, Integer order) throws WxErrorException;
+    WxCpBaseResp editCorpTag(String id, String name, Integer order);
 
     /**
      * <pre>
@@ -548,9 +514,8 @@ public interface WxCpExternalContactService {
      * @param tagId   the tag id
      * @param groupId the group id
      * @return wx cp base resp
-     * @throws WxErrorException the wx error exception
      */
-    WxCpBaseResp delCorpTag(String[] tagId, String[] groupId) throws WxErrorException;
+    WxCpBaseResp delCorpTag(String[] tagId, String[] groupId);
 
     /**
      * <pre>
@@ -563,10 +528,8 @@ public interface WxCpExternalContactService {
      * @param addTag         the add tag
      * @param removeTag      the remove tag
      * @return wx cp base resp
-     * @throws WxErrorException the wx error exception
      */
-    WxCpBaseResp markTag(String userid, String externalUserid, String[] addTag, String[] removeTag) throws WxErrorException;
-
+    WxCpBaseResp markTag(String userid, String externalUserid, String[] addTag, String[] removeTag);
 
 
 }