|
|
@@ -7,6 +7,8 @@ import com.google.gson.JsonArray; |
|
|
|
import com.google.gson.JsonObject; |
|
|
|
import com.iformall.service.toutiao.api.TtOpenComponentService; |
|
|
|
import com.iformall.service.toutiao.api.TtOpenMaService; |
|
|
|
import com.iformall.service.toutiao.api.bean.TtOpenGsonBuilder; |
|
|
|
import com.iformall.service.toutiao.api.bean.TtOpenResult; |
|
|
|
import com.iformall.service.toutiao.miniapp.impl.TtMaServiceImpl; |
|
|
|
import lombok.extern.java.Log; |
|
|
|
import me.chanjar.weixin.common.error.WxErrorException; |
|
|
@@ -289,7 +291,7 @@ public class TtOpenMaServiceImpl extends TtMaServiceImpl implements TtOpenMaServ |
|
|
|
* @throws WxErrorException |
|
|
|
*/ |
|
|
|
@Override |
|
|
|
public WxOpenResult codeCommit(Long templateId, String userVersion, String userDesc, WxMaOpenCommitExtInfo extInfo) throws WxErrorException { |
|
|
|
public TtOpenResult codeCommit(Long templateId, String userVersion, String userDesc, WxMaOpenCommitExtInfo extInfo) throws WxErrorException { |
|
|
|
String uri = API_CODE_COMMIT + "?component_appid=" + ttOpenComponentService.getWxOpenConfigStorage().getComponentAppId(); |
|
|
|
|
|
|
|
JsonObject params = new JsonObject(); |
|
|
@@ -302,7 +304,7 @@ public class TtOpenMaServiceImpl extends TtMaServiceImpl implements TtOpenMaServ |
|
|
|
String response = ttOpenComponentService.postByAppAccessToken(appId,uri,GSON.toJson(params),"authorizer_access_token"); |
|
|
|
log.info("response--------------"+response); |
|
|
|
|
|
|
|
return WxMaGsonBuilder.create().fromJson(response, WxOpenResult.class); |
|
|
|
return TtOpenGsonBuilder.create().fromJson(response, TtOpenResult.class); |
|
|
|
} |
|
|
|
|
|
|
|
/** |
|
|
|