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

Merge branch 'V2.0.1' into test

zhaoxian 3 лет назад
Родитель
Сommit
7d104912d2

+ 1 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/ai/mapper/xml/AiKuaishouAccountAutoVideoMapper.xml

@@ -53,7 +53,7 @@
                 photo_name LIKE concat(#{item},'%')
             </foreach>
         </if>
-        LIMIT #{videoCnt}
+        LIMIT {videoCnt}
     </select>
 
     <select id="getZeroVideoByParams" resultType="cn.com.ctop.kuaishou.modules.ai.entity.AiKuaishouAccountAutoVideo">

+ 14 - 8
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaishouAccountAutoDoServiceImpl.java

@@ -187,6 +187,7 @@ public class AiKuaishouAccountAutoDoServiceImpl implements IAiKuaishouAccountAut
             unitNum = unitNum - customUnitCnt;
         }
         if (unitNum <= 0) {
+            log.info("今日创建已达标");
             return;
         }
         log.info("----- (自定义)账户:{},已建组数:{};剩余待建组数:{}", strategy.getAccountId(), customUnitCnt, unitNum);
@@ -581,6 +582,7 @@ public class AiKuaishouAccountAutoDoServiceImpl implements IAiKuaishouAccountAut
             unitNum = unitNum - programUnitCnt;
         }
         if (unitNum == 0) {
+            log.info("今日创建已达标");
             return;
         }
         log.info("----- (程序化)账户:{},已建组数:{};剩余待建组数:{}", strategy.getAccountId(), programUnitCnt, unitNum);
@@ -1122,21 +1124,25 @@ public class AiKuaishouAccountAutoDoServiceImpl implements IAiKuaishouAccountAut
             log.error("****** {}账户({})通过组级渠道号关键词{},未获取到素材(程序化)", date, accountId, strategy.getMaterialKeyword());
         } else {
             if (allVideos.size() >= 3) {
-                List<List<AiKuaishouAccountAutoVideo>> splitVideos = Lists.partition(allVideos, 10);
-                int size = splitVideos.size() - 1;
+                List<List<AiKuaishouAccountAutoVideo>> splitVideos = Lists.newArrayList(Lists.partition(allVideos, 10));
+                List<List<AiKuaishouAccountAutoVideo>> newVideos = new ArrayList<>();
+                for (List<AiKuaishouAccountAutoVideo> splitVideo : splitVideos) {
+                    newVideos.add(Lists.newArrayList(splitVideo));
+                }
+                int size = newVideos.size() - 1;
                 if (size > 0) {
                     //判断最后一个集合小于3
-                    List<AiKuaishouAccountAutoVideo> lastVideos = splitVideos.get(size);
+                    List<AiKuaishouAccountAutoVideo> lastVideos = newVideos.get(size);
                     if (lastVideos.size() < 3) {
                         //小于3 则去除
                         for (int i = 0; i < size; i++) {
-                            proVideos.add(splitVideos.get(i));
+                            proVideos.add(newVideos.get(i));
                         }
                     } else {
-                        proVideos = splitVideos;
+                        proVideos = newVideos;
                     }
                 } else {
-                    proVideos = splitVideos;
+                    proVideos = newVideos;
                 }
             }
         }
@@ -1616,8 +1622,8 @@ public class AiKuaishouAccountAutoDoServiceImpl implements IAiKuaishouAccountAut
             if (!Check.isNull(strategy.getClickTrackUrl())) {
                 programJson.put("click_url", strategy.getClickTrackUrl());
             }
-            if (!Check.isNull(channel) && !Check.isNull(channel.getActionbarClickUrl())) {
-                programJson.put("click_url", channel.getActionbarClickUrl());
+            if (!Check.isNull(channel) && !Check.isNull(channel.getClickTrackUrl())) {
+                programJson.put("click_url", channel.getClickTrackUrl());
             }
 
             //第三方 ActionBar 点击监控链接