瀏覽代碼

投放位置-首选媒体,选择穿山甲时创意不填组件id

yangzian 3 年之前
父節點
當前提交
bc94c8f8eb

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

@@ -505,13 +505,15 @@ public class AiBytedanceAdvertiserStrategyServiceImpl extends ServiceImpl<AiByte
         //组件id
        JSONArray component = new JSONArray();
        String componentIdStr = strategy.getComponentId();
-       String[] componentId = componentIdStr.split(",");
-        for (String strId : componentId) {
-            JSONObject obj = new JSONObject();
-            obj.put("component_id",new Long(strId));
-            component.add(obj);
-        }
-        creObj.put("component_materials",component);
+       if (!Check.isNull(componentIdStr)){
+           String[] componentId = componentIdStr.split(",");
+           for (String strId : componentId) {
+               JSONObject obj = new JSONObject();
+               obj.put("component_id",new Long(strId));
+               component.add(obj);
+           }
+           creObj.put("component_materials",component);
+       }
 
         params.put("creative",creObj);
         return params;