Pārlūkot izejas kodu

快手文件解析可下载近6个月数据

yumeng 4 gadi atpakaļ
vecāks
revīzija
ec666b62d8

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

@@ -82,13 +82,17 @@ public class AiKuaishouCreateCreativeController {
             if (Check.isNull(hour)) {
                 throw new Exception("小时数据为空");
             }
-            kuaishouCustomCreativeSupplementExecutorService.submit(() -> {
-                try {
-                    createCreativeService.customCreativeSupplement(strategy, hour);
-                } catch (ParseException e) {
-                    e.printStackTrace();
-                }
-            });
+            if (strategy.getHistoryTop() == 0) {
+                kuaishouCustomCreativeSupplementExecutorService.submit(() -> {
+                    try {
+                        createCreativeService.customCreativeSupplement(strategy, hour);
+                    } catch (ParseException e) {
+                        e.printStackTrace();
+                    }
+                });
+            } else {
+                log.info("高质量暂停搭建,accountId:{}", strategy.getAccountId());
+            }
             returnJson.put("code", 0);
             returnJson.put("message", "异步创建中");
         } catch (Exception e) {

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

@@ -402,11 +402,9 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
             remindCnt = this.autoCreateCreative(strategy, 3, remindCnt);
         }
         if (remindCnt >= 1) {
-            if (strategy.getHistoryTop() == 0) {
-                log.info("{}组创建不足,剩余需要创建个数{},使用高质量素材创建", strategy.getAccountId(), remindCnt);
-                //高质量素材
-                remindCnt = this.autoCreateCreative(strategy, 2, remindCnt);
-            }
+            log.info("{}组创建不足,剩余需要创建个数{},使用高质量素材创建", strategy.getAccountId(), remindCnt);
+            //高质量素材
+            remindCnt = this.autoCreateCreative(strategy, 2, remindCnt);
         }
         if (remindCnt >= 1) {
             //历史打捞素材