Jelajahi Sumber

原生创建测试

zhaoxian 2 tahun lalu
induk
melakukan
697e391d51

+ 4 - 4
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouBatchCampaignPreviewServiceImpl.java

@@ -152,12 +152,12 @@ public class KuaishouBatchCampaignPreviewServiceImpl extends ServiceImpl<Kuaisho
         if (Check.isNull(groupJson)) {
             throw new Exception("数据异常,未获取到广告组数据");
         }
-        KuaishouBatchGroupPreview groupPreview = commonGroup(groupJson, batchId, campaignJson);
         //创意
         JSONObject creativeJson = data.getJSONObject("creativeJson");
         if (Check.isNull(creativeJson)) {
             throw new Exception("数据异常,未获取到广告创意数据");
         }
+        KuaishouBatchGroupPreview groupPreview = commonGroup(groupJson, batchId, campaignJson, creativeJson);
         KuaishouBatchCreativePreview creativePreview = commonCreative(creativeJson, batchId);
         //素材数据
         JSONObject materialArray = data.getJSONObject("materialArray");
@@ -706,7 +706,7 @@ public class KuaishouBatchCampaignPreviewServiceImpl extends ServiceImpl<Kuaisho
      * @throws
      * @author ZHAOX A
      */
-    private KuaishouBatchGroupPreview commonGroup(JSONObject groupJson, String batchId, JSONObject campaignJson) {
+    private KuaishouBatchGroupPreview commonGroup(JSONObject groupJson, String batchId, JSONObject campaignJson, JSONObject creativeJson) {
         KuaishouBatchGroupPreview groupPreview = new KuaishouBatchGroupPreview();
         groupPreview.setAccountId(groupJson.getLong("accountId"));
         groupPreview.setUnitName(groupJson.getString("unitName"));
@@ -752,8 +752,8 @@ public class KuaishouBatchCampaignPreviewServiceImpl extends ServiceImpl<Kuaisho
         groupPreview.setExcludeMedia(groupJson.getString("excludeMedia"));
         groupPreview.setMediaSourceType(groupJson.getInteger("mediaSourceType"));
         groupPreview.setSplashAdSwitch(groupJson.getInteger("splashAdSwitch"));
-        groupPreview.setOuterLoopNative(groupJson.getInteger("outerLoopNative"));
-        groupPreview.setKolUserType(groupJson.getInteger("kolUserType"));
+        groupPreview.setOuterLoopNative(creativeJson.getInteger("outerLoopNative"));
+        groupPreview.setKolUserType(creativeJson.getInteger("kolUserType"));
         return groupPreview;
     }