瀏覽代碼

广告位置投放错误,穿山甲开屏视频只支持投放到穿山甲开屏

yangzian 4 年之前
父節點
當前提交
7c26c2968e

+ 10 - 5
jeecg-boot-bytedance/src/main/java/org/jeecg/modules/bytedance/advertise/service/impl/AiBytedanceAdvertiserStrategyServiceImpl.java

@@ -319,15 +319,20 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
     }
     private JSONObject getCreativeParams(AiBytedanceAdvertiserStrategy strategy, Long adId,ByteDanceVideoInfo videoInfo,CtopOauthToken token) {
         JSONObject params = new JSONObject();
-        params.put("advertiser_id",strategy.getAccountId());
-        params.put("ad_id",adId);
+        params.put("advertiser_id", strategy.getAccountId());
+        params.put("ad_id", adId);
         String inventoryType = strategy.getCreativeInventoryType();
-        if(null!=inventoryType&&!"".equals(inventoryType)){
+        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 (inventoryTypeString.length > 0) {
+                params.put("inventory_type", inventoryTypeString);
             }
         }
+    }
+
         Integer smartInventory = strategy.getCreativeSmartInventory();
         if(null!=smartInventory&&smartInventory!=0){
             params.put("smart_inventory",smartInventory);