Browse Source

渠道号

zhaoxian 4 years ago
parent
commit
a9afaf1d70

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

@@ -288,7 +288,6 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
                 }
                 }
             }
             }
         } else {
         } else {
-
             //单一应用
             //单一应用
             String replaceString = KuaishouCreativeMatTypeEnum.getNameByType(strategy.getUnitType().toString() + createType.toString());
             String replaceString = KuaishouCreativeMatTypeEnum.getNameByType(strategy.getUnitType().toString() + createType.toString());
             Long appId = null;
             Long appId = null;
@@ -329,10 +328,11 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
                 }
                 }
                 newCampaignId = getCampaignId(strategy, token, replaceString, "TODAY", createType, appId, strategyUuid, channel);
                 newCampaignId = getCampaignId(strategy, token, replaceString, "TODAY", createType, appId, strategyUuid, channel);
                 if (null == newCampaignId) {
                 if (null == newCampaignId) {
-                    channelService.callBackUpdateChannelRel(level, channel.getChannelCode(), accountId, newCampaignId, null, 0);
+                    if (!Check.isNull(channel)) {
+                        channelService.callBackUpdateChannelRel(level, channel.getChannelCode(), accountId, newCampaignId, null, 0);
+                    }
                     return videoCnt;
                     return videoCnt;
                 }
                 }
-
                 if (useChannel == 1) {
                 if (useChannel == 1) {
                     strategy.setMaterialKeyword(null);
                     strategy.setMaterialKeyword(null);
                     if (!"group".equals(level)) {
                     if (!"group".equals(level)) {
@@ -341,7 +341,9 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
                             if ("account".equals(level)) {
                             if ("account".equals(level)) {
                                 usedchannel = channel;
                                 usedchannel = channel;
                             } else {
                             } else {
-                                channelService.callBackUpdateChannelRel(level, channel.getChannelCode(), accountId, newCampaignId, null, 0);
+                                if (!Check.isNull(channel)) {
+                                    channelService.callBackUpdateChannelRel(level, channel.getChannelCode(), accountId, newCampaignId, null, 0);
+                                }
                                 return videoCnt;
                                 return videoCnt;
                             }
                             }
                         }
                         }
@@ -695,7 +697,9 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
                 }
                 }
                 newCampaignId = getCampaignId(strategy, token, replaceString, "TODAY", createType, appId, strategyUuid, channel);
                 newCampaignId = getCampaignId(strategy, token, replaceString, "TODAY", createType, appId, strategyUuid, channel);
                 if (null == newCampaignId) {
                 if (null == newCampaignId) {
-                    channelService.callBackUpdateChannelRel(level, channel.getChannelCode(), accountId, newCampaignId, null, 0);
+                    if (!Check.isNull(channel)) {
+                        channelService.callBackUpdateChannelRel(level, channel.getChannelCode(), accountId, newCampaignId, null, 0);
+                    }
                     return;
                     return;
                 }
                 }
                 if (useChannel == 1) {
                 if (useChannel == 1) {
@@ -706,7 +710,9 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
                             if ("account".equals(level)) {
                             if ("account".equals(level)) {
                                 usedchannel = channel;
                                 usedchannel = channel;
                             } else {
                             } else {
-                                channelService.callBackUpdateChannelRel(level, channel.getChannelCode(), accountId, newCampaignId, null, 0);
+                                if (!Check.isNull(channel)) {
+                                    channelService.callBackUpdateChannelRel(level, channel.getChannelCode(), accountId, newCampaignId, null, 0);
+                                }
                                 return;
                                 return;
                             }
                             }
                         }
                         }