|
|
@@ -124,15 +124,15 @@ public class TtOpenComponentServiceImpl implements TtOpenComponentService { |
|
|
|
if (!config.isComponentAccessTokenExpired() && !forceRefresh) { |
|
|
|
return config.getComponentAccessToken(); |
|
|
|
} |
|
|
|
String uri = API_COMPONENT_TOKEN_URL + "?component_appid=" + getWxOpenConfigStorage().getComponentAppId() + |
|
|
|
String pream = "component_appid=" + getWxOpenConfigStorage().getComponentAppId() + |
|
|
|
"&component_appsecret=" + getWxOpenConfigStorage().getComponentAppSecret() + |
|
|
|
"&component_ticket=" + getWxOpenConfigStorage().getComponentVerifyTicket(); |
|
|
|
JsonObject jsonObject = new JsonObject(); |
|
|
|
jsonObject.addProperty("component_appid", getWxOpenConfigStorage().getComponentAppId()); |
|
|
|
jsonObject.addProperty("component_appsecret", getWxOpenConfigStorage().getComponentAppSecret()); |
|
|
|
jsonObject.addProperty("component_ticket", getWxOpenConfigStorage().getComponentVerifyTicket()); |
|
|
|
// JsonObject jsonObject = new JsonObject(); |
|
|
|
// jsonObject.addProperty("component_appid", getWxOpenConfigStorage().getComponentAppId()); |
|
|
|
// jsonObject.addProperty("component_appsecret", getWxOpenConfigStorage().getComponentAppSecret()); |
|
|
|
// jsonObject.addProperty("component_ticket", getWxOpenConfigStorage().getComponentVerifyTicket()); |
|
|
|
|
|
|
|
String responseContent = this.getTtOpenService().get(API_COMPONENT_TOKEN_URL, jsonObject.toString()); |
|
|
|
String responseContent = this.getTtOpenService().get(API_COMPONENT_TOKEN_URL, pream); |
|
|
|
WxOpenComponentAccessToken componentAccessToken = WxOpenComponentAccessToken.fromJson(responseContent); |
|
|
|
config.updateComponentAccessToken(componentAccessToken); |
|
|
|
return config.getComponentAccessToken(); |
|
|
|