Przeglądaj źródła

渠道号。。。修改bug

zhaoxian 3 lat temu
rodzic
commit
e87a343dd4

+ 5 - 4
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/ai/service/impl/AiKuaishouCreateCreativeServiceImpl.java

@@ -331,7 +331,7 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
                 return videoCnt;
             }
             KuaishouChannel usedchannel = null;
-            if (useChannel == 1) {
+            if (useChannel == 1 && !"group".equals(level)) {
                 usedchannel = channelService.queryUsedChannel(accountId, newCampaignId, level);
                 if (Check.isNull(usedchannel)) {
                     if ("account".equals(level)) {
@@ -684,13 +684,13 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
                 return;
             }
             KuaishouChannel usedchannel = null;
-            if (useChannel == 1) {
+            if (useChannel == 1 && !"group".equals(level)) {
                 usedchannel = channelService.queryUsedChannel(accountId, newCampaignId, level);
                 if (Check.isNull(usedchannel)) {
                     if ("account".equals(level)) {
                         usedchannel = channel;
                     } else {
-                        return ;
+                        return;
                     }
                 }
                 List<KuaishouChannelItems> items = usedchannel.getItems();
@@ -746,7 +746,8 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
                 }
 
                 //创建组
-                String unitName = getName(strategy.getGroupName(), strategy, createType, null, "unit", newCampaignId, appId, usedchannel);                JSONObject unitParams = createUnitParams(token, newCampaignId, strategy, unitName, appId, usedchannel);
+                String unitName = getName(strategy.getGroupName(), strategy, createType, null, "unit", newCampaignId, appId, usedchannel);
+                JSONObject unitParams = createUnitParams(token, newCampaignId, strategy, unitName, appId, usedchannel);
                 log.info("创建广告组入参:{}", unitParams);
                 Map<String, Object> unitCreateResult = kuaishouInterfaceService.adUnitCreate(token.getAccessToken(), token.getAccountId(), unitParams, 1);
                 Integer unitCode = (Integer) unitCreateResult.get("code");