瀏覽代碼

update tt

master
xhxu 3 年之前
父節點
當前提交
f44bb23cab
共有 1 個檔案被更改,包括 5 行新增6 行删除
  1. +5
    -6
      mallinkService/src/main/java/com/iformall/service/toutiao/api/impl/TtOpenComponentServiceImpl.java

+ 5
- 6
mallinkService/src/main/java/com/iformall/service/toutiao/api/impl/TtOpenComponentServiceImpl.java 查看文件

@@ -197,7 +197,7 @@ public class TtOpenComponentServiceImpl implements TtOpenComponentService {
private String createPreAuthUrl(String redirectURI) throws WxErrorException {
String uri = API_CREATE_PREAUTHCODE_URL + "?component_appid="+getWxOpenConfigStorage().getComponentAppId();

String responseContent = post(API_CREATE_PREAUTHCODE_URL, null,"component_access_token");
String responseContent = post(uri, null,"component_access_token");
log.info(responseContent +"----------responseContent");

JsonObject jsonObject = TtOpenGsonBuilder.create().fromJson(responseContent, JsonObject.class);
@@ -247,11 +247,10 @@ public class TtOpenComponentServiceImpl implements TtOpenComponentService {
}

@Override
public String retrieveCode(String authorizationCode) throws WxErrorException {
JsonObject jsonObject = new JsonObject();
jsonObject.addProperty("component_appid", getWxOpenConfigStorage().getComponentAppId());
jsonObject.addProperty("authorization_appid", authorizationCode);
String responseContent = post(RETRIEVE_AUTHORIZER_TOKEN_URL, jsonObject.toString(), "component_access_token");
public String retrieveCode(String authorizerAppid) throws WxErrorException {
String uri = RETRIEVE_AUTHORIZER_TOKEN_URL + "?component_appid=" + getWxOpenConfigStorage().getComponentAppId() +
"&authorization_appid=" + authorizerAppid;
String responseContent = post(uri, null, "component_access_token");
TtOpenRetrieveCode retrieveCode = TtOpenGsonBuilder.create().fromJson(responseContent, TtOpenRetrieveCode.class);
if(retrieveCode == null){
return null;


Loading…
取消
儲存