|
@@ -276,22 +276,8 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
JSONObject params = new JSONObject();
|
|
|
params.put("advertiser_id", strategy.getAccountId());
|
|
|
params.put("ad_id", adId);
|
|
|
- String inventoryType = strategy.getCreativeInventoryType();
|
|
|
- if ("CREATIVE_IMAGE_MODE_UNION_SPLASH".equalsIgnoreCase(strategy.getCreativeImageMode())) {
|
|
|
- params.put("inventory_type", new String[]{"INVENTORY_UNION_SPLASH_SLOT"});
|
|
|
- } else {
|
|
|
- if (null != inventoryType && !"".equals(inventoryType)) {
|
|
|
- String[] inventoryTypeString = inventoryType.split(",");
|
|
|
- if (inventoryTypeString.length > 0) {
|
|
|
- params.put("inventory_type", inventoryTypeString);
|
|
|
- }
|
|
|
- }
|
|
|
- }
|
|
|
|
|
|
- Integer smartInventory = strategy.getCreativeSmartInventory();
|
|
|
- if(null!=smartInventory&&smartInventory!=0){
|
|
|
- params.put("smart_inventory",smartInventory);
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
String sceneInventory = strategy.getCreativeSceneInventory();
|
|
|
if(!Check.isNull(sceneInventory)){
|
|
@@ -589,10 +575,29 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
//投放范围
|
|
|
if(null!=strategy.getAdDeliveryRange()&&!"".equals(strategy.getAdDeliveryRange().trim())){
|
|
|
params.put("delivery_range",strategy.getAdDeliveryRange());
|
|
|
- if(!"UNION".equals(strategy.getAdDeliveryRange())){
|
|
|
+ /* if(!"UNION".equals(strategy.getAdDeliveryRange())){
|
|
|
params.put("feed_delivery_search","DISABLED");
|
|
|
+ }*/
|
|
|
+ }
|
|
|
+
|
|
|
+ params.put("inventory_catalog","MANUAL");
|
|
|
+ Integer smartInventory = strategy.getCreativeSmartInventory();
|
|
|
+ if(null!=smartInventory&&smartInventory!=0){
|
|
|
+ params.put("smart_inventory","NORMAL");
|
|
|
+ }
|
|
|
+
|
|
|
+ String inventoryType = strategy.getCreativeInventoryType();
|
|
|
+ if ("CREATIVE_IMAGE_MODE_UNION_SPLASH".equalsIgnoreCase(strategy.getCreativeImageMode())) {
|
|
|
+ params.put("inventory_type", new String[]{"INVENTORY_UNION_SPLASH_SLOT"});
|
|
|
+ } else {
|
|
|
+ if (null != inventoryType && !"".equals(inventoryType)) {
|
|
|
+ String[] inventoryTypeString = inventoryType.split(",");
|
|
|
+ if (inventoryTypeString.length > 0) {
|
|
|
+ params.put("inventory_type", inventoryTypeString);
|
|
|
+ }
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
if(!Check.isNull(strategy.getAdUnionVideoType())){
|
|
|
params.put("union_video_type",strategy.getAdUnionVideoType());
|
|
|
}
|
|
@@ -1050,8 +1055,13 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
|
|
|
if(null != strategy.getCampaignDeliveryRelatedNum()&&!"".equals(strategy.getCampaignDeliveryRelatedNum().trim())){
|
|
|
campaignParam.put("delivery_related_num",strategy.getCampaignDeliveryRelatedNum());
|
|
|
}
|
|
|
+
|
|
|
+ campaignParam.put("marketing_purpose","CONVERSION");
|
|
|
+
|
|
|
+ log.info("token获取失败=>accountId:{}", strategy.getAccountId());
|
|
|
//创建组
|
|
|
Result campaignData = marketingService.createCampaign(token, campaignParam);
|
|
|
+ log.info("===创建组==={}",campaignData);
|
|
|
if(campaignData.getCode()!=0){
|
|
|
AiBytedanceAutocreateLog iBytedanceAutocreateLog = new AiBytedanceAutocreateLog(
|
|
|
strategy.getAccountId(),
|