diff --git a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaWeDocService.java b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaWeDocService.java index 8cd8827af..1356c839b 100644 --- a/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaWeDocService.java +++ b/weixin-java-cp/src/main/java/me/chanjar/weixin/cp/api/WxCpOaWeDocService.java @@ -7,7 +7,7 @@ import me.chanjar.weixin.cp.bean.oa.doc.*; /** * 企业微信文档相关接口. - * https://developer.work.weixin.qq.com/document/path/97392 + * 文档 * * @author Hugo */ @@ -21,8 +21,7 @@ public interface WxCpOaWeDocService { * 请求地址: https://qyapi.weixin.qq.com/cgi-bin/wedoc/create_doc?access_token=ACCESS_TOKEN * * @param request 新建文档对应请求参数 - * @return url 新建文档的访问链接 - * @return docid 新建文档的docid + * @return url:新建文档的访问链接,docid:新建文档的docid * @throws WxErrorException the wx error exception */ WxCpDocCreateData docCreate(@NonNull WxCpDocCreateRequest request) throws WxErrorException; diff --git a/weixin-java-mp/src/main/java/me/chanjar/weixin/mp/util/json/WxMpGsonBuilder.java b/weixin-java-mp/src/main/java/me/chanjar/weixin/mp/util/json/WxMpGsonBuilder.java index 3aced61d3..69e73761a 100644 --- a/weixin-java-mp/src/main/java/me/chanjar/weixin/mp/util/json/WxMpGsonBuilder.java +++ b/weixin-java-mp/src/main/java/me/chanjar/weixin/mp/util/json/WxMpGsonBuilder.java @@ -4,6 +4,7 @@ import com.google.gson.ExclusionStrategy; import com.google.gson.FieldAttributes; import com.google.gson.Gson; import com.google.gson.GsonBuilder; +import me.chanjar.weixin.common.util.http.apache.ApacheHttpClientBuilder; import me.chanjar.weixin.mp.bean.*; import me.chanjar.weixin.mp.bean.card.WxMpCard; import me.chanjar.weixin.mp.bean.card.WxMpCardResult; @@ -55,9 +56,11 @@ public class WxMpGsonBuilder { INSTANCE.registerTypeAdapter(WxMpMaterialNews.class, new WxMpMaterialNewsGsonAdapter()); INSTANCE.registerTypeAdapter(WxMpNewsArticle.class, new WxMpNewsArticleGsonAdapter()); INSTANCE.registerTypeAdapter(WxMpMaterialNewsBatchGetResult.class, new WxMpMaterialNewsBatchGetGsonAdapter()); - INSTANCE.registerTypeAdapter(WxMpMaterialNewsBatchGetResult.WxMaterialNewsBatchGetNewsItem.class, new WxMpMaterialNewsBatchGetGsonItemAdapter()); + INSTANCE.registerTypeAdapter(WxMpMaterialNewsBatchGetResult.WxMaterialNewsBatchGetNewsItem.class, + new WxMpMaterialNewsBatchGetGsonItemAdapter()); INSTANCE.registerTypeAdapter(WxMpMaterialFileBatchGetResult.class, new WxMpMaterialFileBatchGetGsonAdapter()); - INSTANCE.registerTypeAdapter(WxMpMaterialFileBatchGetResult.WxMaterialFileBatchGetNewsItem.class, new WxMpMaterialFileBatchGetGsonItemAdapter()); + INSTANCE.registerTypeAdapter(WxMpMaterialFileBatchGetResult.WxMaterialFileBatchGetNewsItem.class, + new WxMpMaterialFileBatchGetGsonItemAdapter()); INSTANCE.registerTypeAdapter(WxMpCardResult.class, new WxMpCardResultGsonAdapter()); INSTANCE.registerTypeAdapter(WxMpCard.class, new WxMpCardGsonAdapter()); INSTANCE.registerTypeAdapter(WxMpMassPreviewMessage.class, new WxMpMassPreviewMessageGsonAdapter()); @@ -66,7 +69,8 @@ public class WxMpGsonBuilder { INSTANCE.registerTypeAdapter(WxMpUserBlacklistGetResult.class, new WxUserBlacklistGetResultGsonAdapter()); INSTANCE.registerTypeAdapter(WxMpMemberCardUserInfoResult.class, new WxMpMemberCardUserInfoResultGsonAdapter()); INSTANCE.registerTypeAdapter(WxMpMemberCardUpdateResult.class, new WxMpMemberCardUpdateResultGsonAdapter()); - INSTANCE.registerTypeAdapter(WxMpMemberCardActivateTempInfoResult.class, new WxMpMemberCardActivateTempInfoResultGsonAdapter()); + INSTANCE.registerTypeAdapter(WxMpMemberCardActivateTempInfoResult.class, + new WxMpMemberCardActivateTempInfoResultGsonAdapter()); INSTANCE.setExclusionStrategies(new ExclusionStrategy() { @Override @@ -76,11 +80,7 @@ public class WxMpGsonBuilder { @Override public boolean shouldSkipClass(Class aClass) { - if (aClass == File.class) { - return true; - } - - return false; + return aClass == File.class || aClass == ApacheHttpClientBuilder.class; } }); }