diff --git a/weixin-java-open/src/main/java/me/chanjar/weixin/open/api/impl/WxOpenComponentServiceImpl.java b/weixin-java-open/src/main/java/me/chanjar/weixin/open/api/impl/WxOpenComponentServiceImpl.java index 5b71c78393..03d072cdc3 100644 --- a/weixin-java-open/src/main/java/me/chanjar/weixin/open/api/impl/WxOpenComponentServiceImpl.java +++ b/weixin-java-open/src/main/java/me/chanjar/weixin/open/api/impl/WxOpenComponentServiceImpl.java @@ -313,7 +313,17 @@ public WxOpenAuthorizerListResult getAuthorizerList(int begin, int len) throws W jsonObject.addProperty("offset", begin); jsonObject.addProperty("count", len); String responseContent = post(url, jsonObject.toString()); - return WxOpenGsonBuilder.create().fromJson(responseContent, WxOpenAuthorizerListResult.class); + WxOpenAuthorizerListResult ret = WxOpenGsonBuilder.create().fromJson(responseContent, WxOpenAuthorizerListResult.class); + if(ret != null && ret.getList() != null){ + for(Map data : ret.getList()){ + String authorizerAppid = data.get("authorizer_appid"); + String refreshToken = data.get("refresh_token"); + if(authorizerAppid != null && refreshToken != null){ + this.getWxOpenConfigStorage().setAuthorizerRefreshToken(authorizerAppid, refreshToken); + } + } + } + return ret; } @Override