瀏覽代碼

过滤已转化

yumeng 4 年之前
父節點
當前提交
e93c10168d

+ 2 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/entity/KuaiShouGroupTarget.java

@@ -148,6 +148,8 @@ public class KuaiShouGroupTarget {
     @Excel(name = "APP行为-按APP名称", width = 15)
     @ApiModelProperty(value = "APP行为-按APP名称")
     private String appIds;
+
+    private Integer filterConvertedLevel;
     /**
      * 人群包定向
      */

+ 2 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/mapper/xml/KuaiShouGroupTargetMapper.xml

@@ -26,6 +26,7 @@
         app_ids,
         population,
         exclude_population,
+        filter_converted_level,
         is_open,
         no_age_break,
         no_gender_break,
@@ -34,7 +35,6 @@
         values
         <foreach collection="targets" item="targets" separator=",">
             (
-
             #{targets.accountId},
             #{targets.unitId},
             #{targets.region},
@@ -56,6 +56,7 @@
             #{targets.appIds},
             #{targets.population},
             #{targets.excludePopulation},
+            #{targets.filterConvertedLevel},
             #{targets.isOpen},
             #{targets.noAgeBreak},
             #{targets.noGenderBreak},

+ 18 - 16
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/BatchServiceImpl.java

@@ -285,11 +285,15 @@ public class BatchServiceImpl implements IBatchService {
         if (!Check.isNull(requestJson.getJSONArray("deviceBrand"))) {
             targetJson.put("device_brand", requestJson.getJSONArray("deviceBrand"));
         }
+        //设备价格
+        if (!Check.isNull(requestJson.getJSONArray("devicePrice"))) {
+            targetJson.put("device_price", requestJson.getJSONArray("devicePrice"));
+        }
 
         if (sceneId != 5) {
-            //设备价格
-            if (!Check.isNull(requestJson.getJSONArray("devicePrice"))) {
-                targetJson.put("device_price", requestJson.getJSONArray("devicePrice"));
+            //过滤已转化人群纬度
+            if (!Check.isNull(requestJson.getInteger("filterConvertedLevel"))) {
+                targetJson.put("filter_converted_level", requestJson.getInteger("filterConvertedLevel"));
             }
             //商业兴趣类型
             if (!Check.isNull(requestJson.getInteger("businessInterestType"))) {
@@ -596,6 +600,9 @@ public class BatchServiceImpl implements IBatchService {
                 targetJson.put("device_price", requestJson.getJSONArray("devicePrice"));
             }
             if (sceneId != 5) {
+                if (!Check.isNull(requestJson.getInteger("filterConvertedLevel"))) {
+                    targetJson.put("filter_converted_level", requestJson.getInteger("filterConvertedLevel"));
+                }
                 //商业兴趣类型
                 if (!Check.isNull(requestJson.getInteger("businessInterestType"))) {
                     targetJson.put("business_interest_type", requestJson.getInteger("businessInterestType"));
@@ -890,7 +897,9 @@ public class BatchServiceImpl implements IBatchService {
                         targetJson.put("device_price", JSONArray.parseArray(groupTarget.getDevicePrice()));
                     }
                     if (sceneId != 5) {
-
+                        if (!Check.isNull(groupTarget.getFilterConvertedLevel())) {
+                            targetJson.put("filter_converted_level", groupTarget.getFilterConvertedLevel());
+                        }
 
                         //商业兴趣类型
                         if (!Check.isNull(groupTarget.getBusinessInterestType())) {
@@ -1596,25 +1605,18 @@ public class BatchServiceImpl implements IBatchService {
             if (Check.isNull(unitId)) {
                 throw new Exception("请选择广告组");
             }
-
-
             unitJson.put("unit_id", unitId);
-
-
             queryWrapper.eq("unit_id", unitId);
             queryWrapper.last("limit 1");
             KuaiShouGroup kuaiShouGroup = groupMapper.selectOne(queryWrapper);
             if (Check.isNull(kuaiShouGroup)) {
                 throw new Exception("未获取到组信息");
-
             }
-
             String sceneId = kuaiShouGroup.getSceneId();
             if (Check.isNull(sceneId)) {
                 throw new Exception("未获取资源位置");
             }
 
-
             //  JSONObject jsonObject = JSONArr(sceneId);
             Integer scene = (Integer) JSONArray.parseArray(sceneId).get(0);
 
@@ -1745,9 +1747,11 @@ public class BatchServiceImpl implements IBatchService {
             if (!Check.isNull(requestJson.getInteger("network"))) {
                 targetJson.put("network", requestJson.getInteger("network"));
             }
+            // 设备品牌
             if (!Check.isNull(requestJson.getJSONArray("deviceBrand"))) {
                 targetJson.put("device_brand", requestJson.getJSONArray("deviceBrand"));
             }
+            // 设备价格
             if (!Check.isNull(requestJson.getJSONArray("devicePrice"))) {
                 targetJson.put("device_price", requestJson.getJSONArray("devicePrice"));
             }
@@ -1768,7 +1772,9 @@ public class BatchServiceImpl implements IBatchService {
                 targetJson.put("exclude_population", requestJson.getJSONArray("excludePopulation"));
             }
             if (scene != 5) {
-                //设备价格
+                if (!Check.isNull(requestJson.getInteger("filterConvertedLevel"))) {
+                    targetJson.put("filter_converted_level", requestJson.getInteger("filterConvertedLevel"));
+                }
 
                 //商业兴趣类型
                 if (!Check.isNull(requestJson.getInteger("businessInterestType"))) {
@@ -1787,10 +1793,6 @@ public class BatchServiceImpl implements IBatchService {
                     targetJson.put("interest_video", requestJson.getJSONArray("interestVideo"));
                 }
             }
-            // APP行为-按分类
-
-            // 人群包定向
-
 
             if (scene != 5) {
                 JSONObject intelliExtendJson = new JSONObject();

+ 6 - 2
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/impl/KuaiShouGroupServiceImpl.java

@@ -368,7 +368,6 @@ public class KuaiShouGroupServiceImpl extends ServiceImpl<KuaiShouGroupMapper, K
                     group.setUpdateTime(new Date());
                     groups.add(group);
                     // 添加应用信息
-
                     JSONObject diverseJson = detail.getJSONObject("diverse_data");
                     if (!Check.isNull(diverseJson)) {
                         KuaiShouAppInfo appInfo = new KuaiShouAppInfo();
@@ -404,7 +403,6 @@ public class KuaiShouGroupServiceImpl extends ServiceImpl<KuaiShouGroupMapper, K
                         KuaiShouGroupTarget groupTarget = new KuaiShouGroupTarget();
                         groupTarget.setAccountId(advertiserId);
                         groupTarget.setUnitId(unitId);
-
                         if (!Check.isNull(targetJson.getJSONArray("region"))) {
                             groupTarget.setRegion(targetJson.getJSONArray("region").toJSONString());
                         }
@@ -452,6 +450,12 @@ public class KuaiShouGroupServiceImpl extends ServiceImpl<KuaiShouGroupMapper, K
                             groupTarget.setAppIds(targetJson.getJSONArray("app_ids").toJSONString());
                         }
 
+
+                        if (!Check.isNull(targetJson.getInteger("filter_converted_level"))) {
+                            groupTarget.setFilterConvertedLevel(targetJson.getInteger("filter_converted_level"));
+                        }
+
+
                         if (!Check.isNull(targetJson.getJSONArray("population"))) {
                             groupTarget.setPopulation(targetJson.getJSONArray("population").toJSONString());
                         }