|
@@ -2,6 +2,7 @@ package org.jeecg.modules.bytedance.advertise.dockapi;
|
|
|
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
+import com.google.gson.JsonObject;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
import org.apache.http.HttpEntity;
|
|
|
import org.apache.http.client.methods.CloseableHttpResponse;
|
|
@@ -938,7 +939,7 @@ public class MarketingServiceImpl implements MarketingService{
|
|
|
//小程序app_schema
|
|
|
params.put("app_schema", convertQueryVo.getAppSchema());
|
|
|
//附加创意类型
|
|
|
- params.put("advanced_creative_type", convertQueryVo.getAdvancedCreativeType() == null ? "ATTACHED_CREATIVE_NONE" : convertQueryVo.getAdvancedCreativeType());
|
|
|
+ params.put("advanced_creative_type", convertQueryVo.getAdvancedCreativeType() == null ? "NORMAL" : convertQueryVo.getAdvancedCreativeType());
|
|
|
//游戏预约场景
|
|
|
params.put("marketing_scene",convertQueryVo.getMarketingScene());
|
|
|
params = Check.jsonRemoveEmpty(params);
|
|
@@ -1039,4 +1040,40 @@ public class MarketingServiceImpl implements MarketingService{
|
|
|
data.put("video_id", vid);
|
|
|
return HttpUtils.bytedanceGetRequest(token.getAccessToken(),url,data);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @description: 行动号召字段内容获取
|
|
|
+ *
|
|
|
+ * @param token
|
|
|
+ * @param landingType 推广类型
|
|
|
+ * @param advancedCreativeType 附加创意类型
|
|
|
+ * @return: org.jeecg.common.api.vo.Result
|
|
|
+ * @author: zianY
|
|
|
+ */
|
|
|
+ public Result getActionText(CtopOauthToken token, String landingType,String advancedCreativeType) {
|
|
|
+
|
|
|
+ JSONObject data = new JSONObject();
|
|
|
+ data.put("advertiser_id", token.getAccountId());
|
|
|
+ data.put("landing_type", landingType);
|
|
|
+ data.put("advanced_creative_type", advancedCreativeType);
|
|
|
+ //data.put("industry", "");
|
|
|
+ JSONObject jsonObject = HttpUtils.bytedanceGetRequest(token.getAccessToken(),
|
|
|
+ urlPath+ PropertiesUtils.getValue("bytedance_config", "bytedance_v2_tools_action_text_get"),data);
|
|
|
+
|
|
|
+ Integer code = jsonObject.getInteger("code");
|
|
|
+ String message = jsonObject.getString("message");
|
|
|
+
|
|
|
+ if (null == code || !code.equals(0)) {
|
|
|
+ log.info("行动号召字段内容获取接口异常==》accountId:{},message:{}", token.getAccountId(), message);
|
|
|
+ return Result.error(message);
|
|
|
+ }
|
|
|
+ JSONArray dataList = jsonObject.getJSONArray("data");
|
|
|
+ if (null == dataList || dataList.isEmpty()) {
|
|
|
+ log.info("行动号召字段内容获取不存在==》accountId:{},message:{}", token.getAccountId(), message);
|
|
|
+ return Result.error("行动号召字段内容获取");
|
|
|
+ }
|
|
|
+ return Result.successMsg("获取行动号召成功",dataList);
|
|
|
+ }
|
|
|
}
|