Преглед изворни кода

Merge branch 'V2.0.1' into test

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

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

@@ -92,7 +92,7 @@
         SELECT signature FROM ctop_ai_kuaishou_account_auto_video_used
         WHERE account_id =#{accountId}
         AND video_type = 2
-        AND usage_times <= 5
+        AND usage_times >= 5
         <if test="createType !=null">
             AND create_type = #{createType}
         </if>
@@ -114,7 +114,7 @@
         LIMIT #{videoCnt}
     </select>
 
-    <select id="getHistoryCatchVideos" resultType="cn.com.ctop.kuaishou.modules.batch.entity.KuaiShouVideoGet">
+    <select id="getHistoryCatchVideos" resultType="cn.com.ctop.kuaishou.modules.ai.entity.AiKuaishouAccountAutoVideo">
         select
         account_id,
         md5 as 'signature',
@@ -130,7 +130,7 @@
         WHERE account_id =#{accountId}
         AND video_type = 4
         AND create_type = 'custom'
-        AND usage_times &lt;= 2
+        AND usage_times &gt;= 2
         AND stat_date &gt;= DATE_SUB(#{statDate},INTERVAL 60 day)
         group by signature
         )

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

@@ -1764,12 +1764,12 @@ public class AiKuaishouAccountAutoDoServiceImpl implements IAiKuaishouAccountAut
                 //计划下还可建的广告组数
                 toBeBuiltCnt = unitCnt - count;
                 //若比本次待建数少,则用本计划建满,剩余不做创建,下次执行
-                if (toBeBuiltCnt < strategy.getToBeBuiltCnt()) {
+                if (toBeBuiltCnt > 0 && toBeBuiltCnt < strategy.getToBeBuiltCnt()) {
                     strategy.setToBeBuiltCnt(toBeBuiltCnt);
+                    return data.getLong("campaignId");
                 }
-                return data.getLong("campaignId");
             }
-            //判断是否扔可创建计划
+            //判断是否扔可创建计划
             if (planCnt > datas.size()) {
                 return createCampaign(strategy, token, videoType, uuid, channel);
             }
@@ -2391,11 +2391,6 @@ public class AiKuaishouAccountAutoDoServiceImpl implements IAiKuaishouAccountAut
         if (wildcard.contains("{{应用名称}}") || wildcard.contains("{{应用标记}}") || wildcard.contains("{{应用包名}}")) {
             KuaiShouAppList getAppInfo = appListService.getAppInfo(strategy.getAccountId(), appId);
             if (!Check.isNull(getAppInfo)) {
-                if (!wildcard.contains("{{自定义}}")) {
-                    if (wildcard.contains("{{应用标记}}")) {
-                        wildcard = wildcard.replace("{{应用标记}}", "{{应用标记}}-{{自定义}}");
-                    }
-                }
                 wildcard = wildcard.replace("{{应用名称}}", getAppInfo.getAppName());
                 wildcard = wildcard.replace("{{应用标记}}", getAppInfo.getAppVersion());
                 wildcard = wildcard.replace("{{应用包名}}", getAppInfo.getPackageName());