瀏覽代碼

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

zhaoxian 3 年之前
父節點
當前提交
981117160f

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

@@ -1115,8 +1115,10 @@ public class AiKuaishouCreateCreativeServiceImpl implements IAiKuaishouCreateCre
             aiKuaishouCampaignLevelOperationRecordService.saveOrUpdate(record);
             return null;
         }
-
         campaignId = (Long) campaignCreateResult.get("campaignId");
+        if (!Check.isNull(channel)) {
+            channelService.callBackUpdateChannelRel("plan", channel.getChannelCode(), token.getAccountId(), campaignId, null, 1);
+        }
         record.setCampaignId(campaignId);
         aiKuaishouCampaignLevelOperationRecordService.saveOrUpdate(record);
         Integer campaignStatus = strategy.getCampaignStatus();

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

@@ -1085,6 +1085,12 @@ public class KuaishouChannelServiceImpl extends ServiceImpl<KuaishouChannelMappe
         List<KuaishouChannel> channelList = channelMapper.queryByAccountIdLevel(accountId, "account");
         if (!Check.isNull(channelList)) {
             for (KuaishouChannel channel : channelList) {
+                if(channel.getIsHaveItem() == 1){
+                    List<KuaishouChannelItems> list = channelItemsRelService.queryItems(channel.getId());
+                    if (Check.isNull(list) || list.isEmpty()) {
+                        continue;
+                    }
+                }
                 KuaishouChannelRel channelRel = channelRelService.queryByAccountChannelCode(channel.getChannelCode(), accountId, appName);
                 if (Check.isNull(channelRel)) {
                     continue;
@@ -1125,6 +1131,12 @@ public class KuaishouChannelServiceImpl extends ServiceImpl<KuaishouChannelMappe
                 Integer usageTimes = channel.getUsageTimes();//使用次数
                 //优先判断已经循环的次数 大于 使用次数
                 if (haveCycleTimes > usageTimes) {
+                    if(channel.getIsHaveItem() == 1){
+                        List<KuaishouChannelItems> items = channelItemsRelService.queryItems(channel.getId());
+                        if (Check.isNull(items) || items.isEmpty()) {
+                            continue;
+                        }
+                    }
                     // 符合条件,获取该渠道号
                     KuaishouChannelRel channelRel = channelRelService.queryByAccountChannelCode(channel.getChannelCode(), accountId, appName);
                     if (Check.isNull(channelRel)) {