|
@@ -6,6 +6,7 @@ import lombok.extern.slf4j.Slf4j;
|
|
|
import org.jeecg.common.api.vo.Result;
|
|
|
import org.jeecg.modules.bytedance.advertise.entity.AiBytedanceAdvertiserStrategy;
|
|
|
import org.jeecg.modules.bytedance.advertise.entity.ByteDanceAdvertisePlan;
|
|
|
+import org.jeecg.modules.bytedance.advertise.vo.AdConvertQueryVo;
|
|
|
import org.jeecg.modules.bytedance.advertise.vo.AdGroupSearchVo;
|
|
|
import org.jeecg.modules.bytedance.advertise.vo.ByteDanceSearchVo;
|
|
|
import org.jeecg.modules.bytedance.advertise.vo.PlanSearchVo;
|
|
@@ -471,7 +472,6 @@ public class marketing {
|
|
|
* @param adId 计划ID
|
|
|
* @return: org.jeecg.common.api.vo.Result
|
|
|
* @author: zianY
|
|
|
- * @time: 2021/4/19 15:23
|
|
|
*/
|
|
|
public static Result creativeRead(CtopOauthToken token,String advertiserId,String adId) {
|
|
|
JSONObject param = new JSONObject();
|
|
@@ -1002,6 +1002,59 @@ public class marketing {
|
|
|
}
|
|
|
|
|
|
|
|
|
+ /**
|
|
|
+ *
|
|
|
+ * @description: 查询广告计划可用转化目标
|
|
|
+ *
|
|
|
+ * @param token
|
|
|
+ * @param convertQueryVo
|
|
|
+ * @return: org.jeecg.common.api.vo.Result
|
|
|
+ * @author: zianY
|
|
|
+ */
|
|
|
+ public static Result getToolConvertQuery(CtopOauthToken token,AdConvertQueryVo convertQueryVo) {
|
|
|
+
|
|
|
+ JSONObject params = new JSONObject();
|
|
|
+ //广告主id
|
|
|
+ params.put("advertiser_id",convertQueryVo.getAdvertiserId());
|
|
|
+ //广告组推广目的
|
|
|
+ params.put("landing_type", convertQueryVo.getLandingType());
|
|
|
+ //投放内容
|
|
|
+ params.put("promotion_content", convertQueryVo.getPromotionContent());
|
|
|
+ //广告投放范围
|
|
|
+ params.put("delivery_range", convertQueryVo.getDeliveryRange() == null ? "DEFAULT" : convertQueryVo.getDeliveryRange());
|
|
|
+ //落地页链接
|
|
|
+ params.put("external_url", convertQueryVo.getExternalUrl());
|
|
|
+ //应用下载类型
|
|
|
+ params.put("app_type", convertQueryVo.getAppType());
|
|
|
+ //Android应用包名
|
|
|
+ params.put("package_name", convertQueryVo.getPackageName());
|
|
|
+ //iOS应用下载链接
|
|
|
+ params.put("itunes_url", convertQueryVo.getItunesUrl());
|
|
|
+ //小程序app_schema
|
|
|
+ params.put("app_schema", convertQueryVo.getAppSchema());
|
|
|
+ //附加创意类型
|
|
|
+ params.put("advanced_creative_type", convertQueryVo.getAdvancedCreativeType());
|
|
|
+ //游戏预约场景
|
|
|
+ params.put("marketing_scene",convertQueryVo.getMarketingScene());
|
|
|
+ params = Check.jsonRemoveEmpty(params);
|
|
|
+ JSONObject jsonObject = HttpUtils.bytedanceGetRequest(token.getAccessToken(),
|
|
|
+ PropertiesUtils.getValue("bytedance_config", "bytedance_v2_tools_ad_convert_query"),
|
|
|
+ params);
|
|
|
+ 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 data = jsonObject.getJSONObject("data").getJSONArray("custom_audience_list");
|
|
|
+ if (null == data || data.isEmpty()) {
|
|
|
+ log.info("查询广告计划可用转化目标不存在==》accountId:{},message:{}", token.getAccountId(), message);
|
|
|
+ return Result.error("人群包信息不存在");
|
|
|
+ }
|
|
|
+ return Result.successMsg("查询广告计划可用转化目标信息获取成功",data);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
|
|
|
|