zhaoxian пре 3 година
родитељ
комит
d0815ae296

+ 7 - 0
module-kuaishou/src/main/java/cn/com/ctop/kuaishou/modules/ai/controller/KuaishouVideoDirectionalPackageController.java

@@ -101,6 +101,13 @@ public class KuaishouVideoDirectionalPackageController {
             if (!Check.isNull(requestJson.getJSONArray("keyword"))) {
                 directionalPackage.setKeyword(JSONObject.toJSONString(requestJson.getJSONArray("keyword")));
             }
+            if("0".equals(requestJson.getJSONObject("allForm").getString("behaviorInterest"))){
+                directionalPackage.setSceneType("[]");
+                directionalPackage.setTimeType(-1);
+                directionalPackage.setStrengthType(0);
+                directionalPackage.setLabel("[]");
+                directionalPackage.setInterestLabel("[]");
+            }
             kuaishouVideoDirectionalPackageService.saveOrUpdate(directionalPackage);
             String id = "";
             if (!Check.isNull(directionalPackage.getId())) {

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

@@ -254,8 +254,6 @@ public class AiKuaishouProjectCreateCreativeServiceImpl implements IAiKuaishouPr
 
     /**
      * 创建自定义创意
-
-
      *
      * @param strategy   账户配置信息
      * @param createType 创意创建类型 1:素材上新 2:历史高质量 3:历史遗漏素材 4:历史打捞
@@ -295,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(), DateUtils.parseDate(newVideo.getPutStartTime()+" 00:00:01", "yyyy-MM-dd HH:mm:ss"), DateUtils.parseDate(newVideo.getPutEndTime()+" 23:59:59", "yyyy-MM-dd HH:mm:ss"));
+                        boolean b = DateUtils.checkTimeLimit(new Date(), DateUtils.parseDate(newVideo.getPutStartTime() + " 00:00:01", "yyyy-MM-dd HH:mm:ss"), DateUtils.parseDate(newVideo.getPutEndTime() + " 23:59:59", "yyyy-MM-dd HH:mm:ss"));
                         if (b) {
                             newVideos.add(newVideo);
                         }
@@ -462,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(), DateUtils.parseDate(newVideo.getPutStartTime()+" 00:00:01", "yyyy-MM-dd HH:mm:ss"), DateUtils.parseDate(newVideo.getPutEndTime()+" 23:59:59", "yyyy-MM-dd HH:mm:ss"));
+                        boolean b = DateUtils.checkTimeLimit(new Date(), DateUtils.parseDate(newVideo.getPutStartTime() + " 00:00:01", "yyyy-MM-dd HH:mm:ss"), DateUtils.parseDate(newVideo.getPutEndTime() + " 23:59:59", "yyyy-MM-dd HH:mm:ss"));
                         if (b) {
                             allVideos.add(newVideo);
                         }
@@ -1200,13 +1198,10 @@ public class AiKuaishouProjectCreateCreativeServiceImpl implements IAiKuaishouPr
                     if (!checkList(dir.getInterestLabel(), target.getInterestLabel())) {
                         continue;
                     }
-                    if (!checkList(dir.getInterestLabel(), target.getInterestLabel())) {
-                        continue;
-                    }
                     if (!checkList(dir.getSceneType(), target.getSceneType())) {
                         continue;
                     }
-                    if (!Check.isNull(dir.getTimeType())) {
+                    if (!Check.isNull(dir.getTimeType()) && dir.getTimeType() != -1) {
                         if (dir.getTimeType() != target.getTimeType()) {
                             continue;
                         }