Selaa lähdekoodia

原生创建测试

zhaoxian 2 vuotta sitten
vanhempi
commit
cc99bb7284

+ 9 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/KuaishouBatchGroupPreview.java

@@ -170,8 +170,17 @@ public class KuaishouBatchGroupPreview {
     @Excel(name = "投放链接", width = 15)
     @ApiModelProperty(value = "投放链接")
     private String url;
+    /**
+     * 是否开启原生	0关闭,1开启,不填默认为0仅在计划 campaignType=2提升应用安装、5收集销售线索、7提升应用活跃、19推广快手小程序时,
+     * 可开启原生投放。
+     */
+    private Integer outerLoopNative;
 
     /**
+     * 原生达人用户类型	2服务号原生,3聚星达人原生,当outer_loop_native为1时此项必填
+     */
+    private Integer kolUserType;
+    /**
      * 调起链接
      */
     @Excel(name = "调起链接", width = 15)

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

@@ -752,6 +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"));
         return groupPreview;
     }
 

+ 10 - 0
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaishouBatchCreativePreviewServiceImpl.java

@@ -358,6 +358,16 @@ public class KuaishouBatchCreativePreviewServiceImpl extends ServiceImpl<Kuaisho
             if (!Check.isNull(ocpxActionType)) {
                 unitJson.put("ocpx_action_type", ocpxActionType);
             }
+            // 是否开启原生 0关闭,1开启
+            Integer outerLoopNative = groupPreview.getOuterLoopNative();
+            if (!Check.isNull(outerLoopNative)) {
+                unitJson.put("outer_loop_native", outerLoopNative);
+            }
+            // 原生达人用户类型
+            Integer kolUserType = groupPreview.getKolUserType();
+            if (!Check.isNull(kolUserType)) {
+                unitJson.put("kol_user_type", kolUserType);
+            }
             // 广告组的投放状态
             Integer putStatus = groupPreview.getPutStatus();
             if (!Check.isNull(putStatus)) {

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

@@ -987,6 +987,8 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
             headers.put("Content-Type", " application/json");
             String result = HttpUtils.kuaiShouhttpPostRequest(url, requestJson.toJSONString(), headers);
             JSONObject resultJson = JSONObject.parseObject(result);
+            System.out.println("入参:"+requestJson.toJSONString());
+            System.out.println("返回:"+resultJson);
             log.info("【快手】建组返回,accountId:{},---结果:{}", advertiserId, resultJson);
             if (!Check.isNull(resultJson)) {
                 Integer code = resultJson.getInteger("code");
@@ -2177,6 +2179,8 @@ public class KuaishouInterfaceServiceImpl implements IKuaishouInterfaceService {
             header.put("Access-Token", accessToken);
             String result = HttpUtils.kuaiShouhttpPostRequest(url, requestJson.toJSONString(), header);
             JSONObject resultJson = JSONObject.parseObject(result);
+            System.out.println("创意入参:"+requestJson.toJSONString());
+            System.out.println("创意返回:"+resultJson);
             log.info("【快手】建创意返回,accountId:{},---结果:{}", advertiserId, resultJson);
             if (!Check.isNull(resultJson)) {
                 Integer code = resultJson.getInteger("code");