ソースを参照

渠道号。。。修改查询渠道逻辑

zhaoxian 3 年 前
コミット
ed5daebb26

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

@@ -330,7 +330,9 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
             if (null == newCampaignId) {
                 return videoCnt;
             }
-            channel = channelService.queryUsedChannel(accountId, newCampaignId, level);
+            if (useChannel == 1) {
+                channel = channelService.queryUsedChannel(accountId, newCampaignId, level);
+            }
             if (Check.isNull(channel)) {
                 return videoCnt;
             }
@@ -676,7 +678,9 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
             if (null == newCampaignId) {
                 return;
             }
-            channel = channelService.queryUsedChannel(accountId, newCampaignId, level);
+            if (useChannel == 1) {
+                channel = channelService.queryUsedChannel(accountId, newCampaignId, level);
+            }
             if (Check.isNull(channel)) {
                 return;
             }

+ 1 - 1
jeecg-boot-module-system/src/main/java/cn/com/ctop/kuaishou/modules/channel/service/impl/KuaishouChannelServiceImpl.java

@@ -1071,7 +1071,7 @@ public class KuaishouChannelServiceImpl extends ServiceImpl<KuaishouChannelMappe
     @Override
     public KuaishouChannel queryUsedChannel(Long accountId, Long newCampaignId, String level) {
         KuaishouChannel channel = channelMapper.queryUsedChannel(accountId, newCampaignId, level);
-        if (channel.getIsHaveItem() == 1) {
+        if (!Check.isNull(channel)&&channel.getIsHaveItem() == 1) {
             List<KuaishouChannelItems> list = channelItemsRelService.queryItems(channel.getId());
             if (Check.isNull(list) || list.isEmpty()) {
                 return null;