Просмотр исходного кода

项目自动投放策略,素材筛选添加可用时间限制

zhaoxian 3 лет назад
Родитель
Сommit
21ae653f7c

+ 3 - 3
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaishouProjectCreateCreativeServiceImpl.java

@@ -154,7 +154,7 @@ public class AiKuaishouProjectCreateCreativeServiceImpl implements IAiKuaishouPr
             //创意制作方式,0-不限,4-自定义,7-程序化创意
             if (strategy.getUnitType() == 4) {
                 this.autoCreateCreative(strategy, 1, customUnitCnt, 1);
-            } else{
+            } else {
                 this.autoCreateProgramCreative(strategy, 1, programUnitCnt, 1);
             }
         } catch (Exception e) {
@@ -293,7 +293,7 @@ public class AiKuaishouProjectCreateCreativeServiceImpl implements IAiKuaishouPr
                 List<KuaiShouVideoGet> newVideos = new ArrayList<>();
                 for (KuaiShouVideoGet newVideo : newVideoList) {
                     if (!Check.isNull(newVideo.getPutEndTime()) && !Check.isNull(newVideo.getPutStartTime())) {
-                        boolean b = DateUtils.checkTimeLimit(new Date(), newVideo.getPutStartTime(), newVideo.getPutEndTime());
+                        boolean b = DateUtils.checkTimeLimit(new Date(), DateUtils.parseDate(newVideo.getPutStartTime(), "yyyy-MM-dd HH:mm:ss"), DateUtils.parseDate(newVideo.getPutEndTime(), "yyyy-MM-dd HH:mm:ss"));
                         if (b) {
                             newVideos.add(newVideo);
                         }
@@ -460,7 +460,7 @@ public class AiKuaishouProjectCreateCreativeServiceImpl implements IAiKuaishouPr
                 List<KuaiShouVideoGet> allVideos = new ArrayList<>();
                 for (KuaiShouVideoGet newVideo : allVideoList) {
                     if (!Check.isNull(newVideo.getPutEndTime()) && !Check.isNull(newVideo.getPutStartTime())) {
-                        boolean b = DateUtils.checkTimeLimit(new Date(), newVideo.getPutStartTime(), newVideo.getPutEndTime());
+                        boolean b = DateUtils.checkTimeLimit(new Date(), DateUtils.parseDate(newVideo.getPutStartTime(), "yyyy-MM-dd HH:mm:ss"), DateUtils.parseDate(newVideo.getPutEndTime(), "yyyy-MM-dd HH:mm:ss"));
                         if (b) {
                             allVideos.add(newVideo);
                         }

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

@@ -59,9 +59,9 @@ public class KuaiShouVideoGet {
     private String supplierAccountName;
 
     @TableField(exist = false)
-    private Date putStartTime;
+    private String putStartTime;
     @TableField(exist = false)
-    private Date putEndTime;
+    private String putEndTime;
 
     /**
      * 创建时间