浏览代码

智能投放增加拉取当日塑造视频

jiequan.bi 4 年之前
父节点
当前提交
f913670ed4

+ 3 - 1
jeecg-boot-module-system/src/main/java/org/jeecg/modules/ads/service/impl/AiStrategyServiceImpl.java

@@ -59,6 +59,7 @@ public class AiStrategyServiceImpl implements IAiStrategyService {
     private IKuaiShouMaterialUploadService materialUploadService;
     @Autowired
     private KuaiShouVideoGetMapper videoGetMapper;
+
     /**
      *
      * @param strategy
@@ -85,7 +86,8 @@ public class AiStrategyServiceImpl implements IAiStrategyService {
         // 1: 根据模板信息表里的 material_select_method (素材选择方式),得到"跑量视频"和"上新视频"获取方式
         // {'highQualityMaterial':{'days':7, 'num':5},'newMaterialNum':5}
         // TODO 更新该账户下的 ctop_kuaishou_video_get 数据
-//        videoGetService.
+
+        kuaishouInterfaceService.getSuZaoList(token.getAccessToken(),accountId,1,DateUtils.date2Str(),DateUtils.date2Str());
 
         JSONObject MaterialSelectMethod = JSONObject.parseObject(strategyTemplate.getMaterialSelectMethod());
         List<KuaiShouVideoGet> newVideos = new ArrayList<KuaiShouVideoGet>();

+ 3 - 0
module-alarm/src/main/java/cn/com/ctop/alarm/modules/entity/RuleIndicator.java

@@ -75,6 +75,9 @@ public class RuleIndicator {
     @Excel(name = "对应数据字典id", width = 15)
     @ApiModelProperty(value = "对应数据字典id")
     private String dictId;
+
+    private String requestUrl;
+
     /**
      * 对应数据表名称
      */

+ 19 - 0
module-common/src/main/java/cn/com/ctop/common/module/entity/RuleDataTargetKuaishou.java

@@ -39,4 +39,23 @@ public class RuleDataTargetKuaishou {
 	private String scheduleTime;
 
 	private Integer status;
+
+	/**应用商店*/
+	private String appStore;
+
+	/**定向人群包*/
+	private String population;
+
+	/**排除人群包*/
+	private String excludePopulation;
+
+	/**年龄范围*/
+	private String agesRange;
+
+	/**商业兴趣*/
+	private String businessInterest;
+
+	/**网络环境*/
+	private Integer network;
+
 }

+ 0 - 1
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/batch/service/IKuaiShouVideoGetService.java

@@ -26,7 +26,6 @@ public interface IKuaiShouVideoGetService extends IService<KuaiShouVideoGet> {
 
     List<KuaiShouVideoGet> getNewVideoByAccountId(Long accountId,Integer videoAiStatus);
 
-
     List<KuaiShouVideoGet> getNewVideoDescDate(Long accountId,Integer newVideoCnt);
 
 

+ 32 - 11
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/report/service/impl/RuleKuaiShouPlanServiceImpl.java

@@ -201,28 +201,49 @@ public class RuleKuaiShouPlanServiceImpl extends ServiceImpl<RuleDatePlanKuaisho
                 target.setPlanId(unitDetail.getLong("campaign_id"));
                 target.setUnitId(unitDetail.getLong("unit_id"));
                 target.setSceneId(unitDetail.getJSONArray("scene_id")==null?"":unitDetail.getJSONArray("scene_id").toString());
-
-                JSONArray region = unitDetail.getJSONObject("target").getJSONArray("region");
+                //获取组定向信息
+                JSONObject unitTarget = unitDetail.getJSONObject("target");
+                //地域
+                JSONArray region = unitTarget.getJSONArray("region");
                 target.setRegion(region==null?"":region.toJSONString());
-
+                //性别
                 Integer gender = unitDetail.getJSONObject("target").getInteger("gender");
                 target.setGender(gender==null?0:gender);
-
-                Integer platformOs = unitDetail.getJSONObject("target").getInteger("platform_os");
+                //年龄
+                JSONArray agesRange = unitTarget.getJSONArray("ages_range");
+                target.setAgesRange(agesRange==null?"":agesRange.toJSONString());
+                //操作系统
+                Integer platformOs = unitTarget.getInteger("platform_os");
                 target.setPlatformOs(platformOs==null?0:platformOs);
-
-                JSONArray deviceBrand = unitDetail.getJSONObject("target").getJSONArray("device_brand");
+                //设类类型
+                JSONArray deviceBrand = unitTarget.getJSONArray("device_brand");
                 target.setDeviceBrand(deviceBrand==null?"":deviceBrand.toJSONString());
-
-                JSONArray devicePrice = unitDetail.getJSONObject("target").getJSONArray("device_price");
+                //设备价格
+                JSONArray devicePrice = unitTarget.getJSONArray("device_price");
                 target.setDevicePrice(devicePrice==null?"":devicePrice.toJSONString());
-
-                Integer filterConvertedLevel = unitDetail.getJSONObject("target").getInteger("filter_converted_level");
+                //过滤已转化人群
+                Integer filterConvertedLevel = unitTarget.getInteger("filter_converted_level");
                 target.setFilterConvertedLevel(filterConvertedLevel);
+                //人群包定向
+                JSONArray population = unitTarget.getJSONArray("population");
+                target.setPopulation(population==null?"":population.toJSONString());
+                //人群包排除
+                JSONArray excludePopulation = unitTarget.getJSONArray("exclude_population");
+                target.setExcludePopulation(excludePopulation==null?"":excludePopulation.toJSONString());
+                //应用商店
+                JSONArray appStore = unitDetail.getJSONArray("app_store");
+                target.setAppStore(appStore==null?"":appStore.toJSONString());
+                //商业兴趣
+                JSONArray businessInterest = unitTarget.getJSONArray("business_interest");
+                target.setBusinessInterest(businessInterest==null?"":businessInterest.toJSONString());
+                //网络环境
+                Integer network = unitTarget.getInteger("network");
+                target.setNetwork(network==null?0:network);
 
                 Integer isOpen = unitDetail.getJSONObject("target").getJSONObject("intelli_extend").getInteger("is_open");
                 target.setIsOpen(isOpen==null?0:isOpen);
                 target.setScheduleTime(unitDetail.getString("schedule_time")==null?"":unitDetail.getString("schedule_time"));
+
                 batch.add(target);
             }
         });