Przeglądaj źródła

账户自动投放-渠道号通配符匹配修改

zhaoxian 4 lat temu
rodzic
commit
54735bf0dc

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

@@ -1671,11 +1671,12 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
 
 
     private String getName(String wildcard, AiKuaishouAdvertiserStrategy strategy, Integer createType, String materialName, String type, Long campaignId, Long appId, KuaishouChannel channel) {
-        if (!Check.isNull(channel)) {
-            if (wildcard.contains("{{渠道号}}")) {
+        if (wildcard.contains("{{渠道号}}") || wildcard.contains("{{渠道号名称}}")) {
+            if (Check.isNull(channel)) {
+                wildcard = wildcard.replace("{{渠道号}}", "");
+                wildcard = wildcard.replace("{{渠道号名称}}", "");
+            } else {
                 wildcard = wildcard.replace("{{渠道号}}", channel.getChannelCode());
-            }
-            if (wildcard.contains("{{渠道号名称}}")) {
                 wildcard = wildcard.replace("{{渠道号名称}}", channel.getChannelName());
             }
         }