Преглед на файлове

自动投放——计划命名标识

zhaoxian преди 3 години
родител
ревизия
913b9956d4

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

@@ -364,7 +364,7 @@ public class AiKuaishouAccountAutoDoServiceImpl implements IAiKuaishouAccountAut
                     AiKuaishouUnitLevelOperationRecord unitRecord = new AiKuaishouUnitLevelOperationRecord(strategy, unitParams, unitCode, unitMessage, strategyUuid, videoItem.getAutoTargetId(), channelId);
                     if (unitCode != 0) {
                         log.error("****** 账户({})组创建失败,入参:{},message:{}", accountId, unitParams, unitMessage);
-                        String redisKey = strategy.getAccountId() + "_" + newCampaignId + DateUtils.formatDate(new Date(), "yy-MMdd");
+                        String redisKey = strategy.getAccountId() + "_" + newCampaignId + DateUtils.formatDate(new Date(), "yyMMdd");
                         Integer redisCnt = (Integer) redisUtil.get(redisKey);
                         redisUtil.set(redisKey, redisCnt - 1, 100000L);
                         unitLevelOperationRecordService.saveOrUpdate(unitRecord);
@@ -1776,7 +1776,7 @@ public class AiKuaishouAccountAutoDoServiceImpl implements IAiKuaishouAccountAut
      */
     private Long getCampaignId(AiKuaishouAccountAutoStrategy strategy, CtopOauthToken token, Integer videoType, String uuid, KuaishouChannel channel) {
         String nowDate = DateUtils.getNowDate("yyyy-MM-dd") + " 00:00:01";
-        String typeNa = "程序化";
+        String typeNa = "程序化";
         //计划数
         Integer planCnt = strategy.getProgramPlanCnt();
         //组数
@@ -1784,7 +1784,7 @@ public class AiKuaishouAccountAutoDoServiceImpl implements IAiKuaishouAccountAut
         if (strategy.getUnitType() == 4) {
             planCnt = strategy.getCustomPlanCnt();
             unitCnt = strategy.getCustomUnitCnt();
-            typeNa = "自定义";
+            typeNa = "自定义";
         }
         List<JSONObject> datas = campaignService.getCampaignIdsByParameters(strategy.getAccountId(), typeNa, nowDate);
         int toBeBuiltCnt = 0;
@@ -2303,7 +2303,7 @@ public class AiKuaishouAccountAutoDoServiceImpl implements IAiKuaishouAccountAut
             if (Check.isNull(count) || count == 0) {
                 count = 1;
             }
-            //广告语集 
+            //广告语集
             JSONArray descList = JSONArray.parseArray(strategy.getDescription());
             JSONArray creatives = new JSONArray();
             for (int i = 0; i < count; i++) {
@@ -2460,13 +2460,13 @@ public class AiKuaishouAccountAutoDoServiceImpl implements IAiKuaishouAccountAut
         if (!wildcard.contains("{{自定义}}")) {
             wildcard = wildcard + "-{{自定义}}";
         }
-        String nowDate = DateUtils.formatDate(new Date(), "yy-MMdd");
+        String nowDate = DateUtils.formatDate(new Date(), "yyMMdd");
         if ("plan".equals(type)) {
             //创意制作方式
             if (strategy.getUnitType() == 4) {
-                wildcard = wildcard.replace("{{自定义}}", "自定义");
+                wildcard = wildcard.replace("{{自定义}}", "自定义");
             } else {
-                wildcard = wildcard.replace("{{自定义}}", "程序化");
+                wildcard = wildcard.replace("{{自定义}}", "程序化");
             }
             if (wildcard.contains("{{日期}}")) {
                 wildcard = wildcard.replace("{{日期}}", nowDate);