|
@@ -724,7 +724,6 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
if (!Check.isNull(strategy.getDeepConversionBid())) {
|
|
|
unitParams.put("deep_conversion_bid", strategy.getDeepConversionBid());
|
|
|
}
|
|
|
-
|
|
|
Integer sceneId = null;
|
|
|
String scenceIdString = strategy.getSceneId();
|
|
|
|
|
@@ -733,7 +732,6 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
sceneId = scenceArray.getInteger(0);
|
|
|
unitParams.put("scene_id", scenceArray);
|
|
|
}
|
|
|
-
|
|
|
Integer campaignType = strategy.getCampaignType();
|
|
|
if (campaignType == 2) { // 提升应用安装
|
|
|
//应用ID
|
|
@@ -756,11 +754,9 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
if (!Check.isNull(strategy.getUrlType())) {
|
|
|
unitParams.put("url_type", strategy.getUrlType());
|
|
|
}
|
|
|
-
|
|
|
if (!Check.isNull(strategy.getUrl())) {
|
|
|
unitParams.put("url", strategy.getUrl());
|
|
|
}
|
|
|
-
|
|
|
} else if (campaignType == 5) { //收集销售线索
|
|
|
//url类型
|
|
|
if (!Check.isNull(strategy.getWebUriType())) {
|
|
@@ -770,7 +766,6 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
if (!Check.isNull(strategy.getUrl())) {
|
|
|
unitParams.put("url", strategy.getUrl());
|
|
|
}
|
|
|
-
|
|
|
} else if (campaignType == 7) { // 提高应用活跃
|
|
|
// appId
|
|
|
if (!Check.isNull(appId)) {
|
|
@@ -786,7 +781,6 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
unitParams.put("schema_uri", strategy.getSchemaUri());
|
|
|
}
|
|
|
}
|
|
|
-
|
|
|
//投放开始时间
|
|
|
if (!Check.isNull(strategy.getBeginTime())) {
|
|
|
unitParams.put("begin_time", strategy.getBeginTime());
|
|
@@ -805,8 +799,6 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
if (!Check.isNull(strategy.getConvertId())) {
|
|
|
unitParams.put("convert_id", strategy.getConvertId());
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
//创意展现方式
|
|
|
if (!Check.isNull(strategy.getShowMode())) {
|
|
|
unitParams.put("show_mode", strategy.getShowMode());
|
|
@@ -827,7 +819,6 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
if (!Check.isNull(strategy.getAutoCreatePhoto())) {
|
|
|
unitParams.put("auto_create_photo", strategy.getAutoCreatePhoto());
|
|
|
}
|
|
|
-
|
|
|
if (unitType == 7) {
|
|
|
//是否开启智能抽帧
|
|
|
if (!Check.isNull(strategy.getSmartCover())) {
|
|
@@ -857,8 +848,6 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
// 定向数据
|
|
|
unitParams.put("target", target);
|
|
|
}
|
|
|
-
|
|
|
-
|
|
|
// 设置定向内容
|
|
|
JSONObject targetJsonObject = new JSONObject();
|
|
|
if (null != strategy.getRegion() && !"".equals(strategy.getRegion())) {
|
|
@@ -888,9 +877,10 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
if (null != strategy.getDevicePrice() && !"".equals(strategy.getDevicePrice()) && !"[]".equals(strategy.getDevicePrice())) {
|
|
|
targetJsonObject.put("device_price", JSON.parseArray(strategy.getDevicePrice()));
|
|
|
}
|
|
|
-
|
|
|
- if (null != strategy.getFilterConvertedLevel() && strategy.getFilterConvertedLevel() != 0) {
|
|
|
- targetJsonObject.put("filter_converted_level", strategy.getFilterConvertedLevel());
|
|
|
+ if (sceneId != 5) {
|
|
|
+ if (null != strategy.getFilterConvertedLevel() && strategy.getFilterConvertedLevel() != 0) {
|
|
|
+ targetJsonObject.put("filter_converted_level", strategy.getFilterConvertedLevel());
|
|
|
+ }
|
|
|
}
|
|
|
|
|
|
JSONArray appInterest = JSONArray.parseArray(strategy.getAppInterest());
|
|
@@ -919,19 +909,21 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
|
|
|
}
|
|
|
|
|
|
//是否开启智能扩量
|
|
|
- if (null != strategy.getIsOpen() && strategy.getIsOpen().equals(1)) {
|
|
|
- JSONObject intelliExtend = new JSONObject();
|
|
|
- intelliExtend.put("is_open", 1);
|
|
|
- if (null != strategy.getNoAgeBreak() && strategy.getNoAgeBreak().equals(1)) {
|
|
|
- intelliExtend.put("no_age_break", 1);
|
|
|
- }
|
|
|
- if (null != strategy.getNoGenderBreak() && strategy.getNoGenderBreak().equals(1)) {
|
|
|
- intelliExtend.put("no_gender_break", 1);
|
|
|
- }
|
|
|
- if (null != strategy.getNoAreaBreak() && strategy.getNoAreaBreak().equals(1)) {
|
|
|
- intelliExtend.put("no_area_break", 1);
|
|
|
+ if (sceneId != 5) {
|
|
|
+ if (null != strategy.getIsOpen() && strategy.getIsOpen().equals(1)) {
|
|
|
+ JSONObject intelliExtend = new JSONObject();
|
|
|
+ intelliExtend.put("is_open", 1);
|
|
|
+ if (null != strategy.getNoAgeBreak() && strategy.getNoAgeBreak().equals(1)) {
|
|
|
+ intelliExtend.put("no_age_break", 1);
|
|
|
+ }
|
|
|
+ if (null != strategy.getNoGenderBreak() && strategy.getNoGenderBreak().equals(1)) {
|
|
|
+ intelliExtend.put("no_gender_break", 1);
|
|
|
+ }
|
|
|
+ if (null != strategy.getNoAreaBreak() && strategy.getNoAreaBreak().equals(1)) {
|
|
|
+ intelliExtend.put("no_area_break", 1);
|
|
|
+ }
|
|
|
+ targetJsonObject.put("intelli_extend", intelliExtend);
|
|
|
}
|
|
|
- targetJsonObject.put("intelli_extend", intelliExtend);
|
|
|
}
|
|
|
unitParams.put("target", targetJsonObject);
|
|
|
log.info("广告组创建参数:{}", unitParams.toJSONString());
|