소스 검색

明细表导出修改

wangyunpeng 1 개월 전
부모
커밋
26e6fd0315

+ 13 - 11
long-article-recommend-service/src/main/java/com/tzld/longarticle/recommend/server/service/recommend/DataDashboardService.java

@@ -537,8 +537,8 @@ public class DataDashboardService {
                 ProducePlan producePlan = producePlanMap.get(record.getPlanId());
                 obj.setProducePlanName(producePlan.getName());
                 obj.setProducePlanTag(producePlan.getPlanTag());
+                producePlanInputSourceList = inputSourceMap.get(record.getPlanId());
             }
-            producePlanInputSourceList = inputSourceMap.get(record.getPlanId());
         }
         if (publishContent.getSourceType().equals(PublishPlanInputSourceTypesEnum.longArticleVideoPoolSource.getVal())) {
             PublishSingleVideoSource videoPoolSource = videoPoolSourceMap.get(publishContent.getSourceId());
@@ -554,18 +554,20 @@ public class DataDashboardService {
             }
         }
         List<CrawlerPlanResultRel> crawlerPlanRelList = resultRelMap.get(publishContent.getCrawlerChannelContentId());
-        if (CollectionUtil.isNotEmpty(crawlerPlanRelList) && CollectionUtil.isNotEmpty(producePlanInputSourceList)) {
+        if (CollectionUtils.isNotEmpty(crawlerPlanRelList) && CollectionUtils.isNotEmpty(producePlanInputSourceList)) {
             List<String> inputSourceValues = producePlanInputSourceList.stream()
                     .map(ProducePlanInputSource::getInputSourceValue).collect(Collectors.toList());
-            List<CrawlerPlan> crawlerPlanItemList = new ArrayList<>();
-            for (CrawlerPlanResultRel crawlerPlanResultRel : crawlerPlanRelList) {
-                crawlerPlanItemList.add(crawlerPlanMap.get(crawlerPlanResultRel.getPlanId()));
-            }
-            for (CrawlerPlan crawlerPlan : crawlerPlanItemList) {
-                if (inputSourceValues.contains(crawlerPlan.getId())) {
-                    obj.setCrawlerPlanName(crawlerPlan.getName());
-                    obj.setCrawlerPlanTag(crawlerPlan.getPlanTag());
-                    break;
+            if (CollectionUtils.isNotEmpty(inputSourceValues)) {
+                List<CrawlerPlan> crawlerPlanItemList = new ArrayList<>();
+                for (CrawlerPlanResultRel crawlerPlanResultRel : crawlerPlanRelList) {
+                    crawlerPlanItemList.add(crawlerPlanMap.get(crawlerPlanResultRel.getPlanId()));
+                }
+                for (CrawlerPlan crawlerPlan : crawlerPlanItemList) {
+                    if (inputSourceValues.contains(crawlerPlan.getId())) {
+                        obj.setCrawlerPlanName(crawlerPlan.getName());
+                        obj.setCrawlerPlanTag(crawlerPlan.getPlanTag());
+                        break;
+                    }
                 }
             }
         }