| 
														
															@@ -388,44 +388,72 @@ public class CoreServiceImpl implements CoreService { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             if (!flag) { 
														 | 
														
														 | 
														
															             if (!flag) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 continue; 
														 | 
														
														 | 
														
															                 continue; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            ArticleSortRequest articleSortRequest = new ArticleSortRequest(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            articleSortRequest.setAccountId(planAccount.getAccountId()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            articleSortRequest.setAccountName(planAccount.getAccountName()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            articleSortRequest.setGhId(planAccount.getGhId()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            //测试参数 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            //获取待排序数据 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            LongArticleSystemGetContentsParam waitingSortParam = new LongArticleSystemGetContentsParam(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            waitingSortParam.setPlanId(planAccount.getPlanId()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            waitingSortParam.setAccountId(planAccount.getAccountId()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            waitingSortParam.setPageNum(1); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            waitingSortParam.setPageSize(planAccount.getPublishPreNum()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            LongArticleSystemContentVO longArticleSystemContentVO = aigcService.listWaitingSortContents(waitingSortParam); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if (longArticleSystemContentVO == null 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    || longArticleSystemContentVO.getTotalCount() < planAccount.getPublishPreMinNum() 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    || CollectionUtils.isEmpty(longArticleSystemContentVO.getContentItemList()) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    || longArticleSystemContentVO.getContentItemList().size() < planAccount.getPublishPreMinNum()) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                continue; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            List<PublishArticleData> rankList; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if (StringUtils.isNotEmpty(planAccount.getSortStrategy())) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                ArticleSortRequest articleSortRequest = new ArticleSortRequest(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                articleSortRequest.setAccountId(planAccount.getAccountId()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                articleSortRequest.setAccountName(planAccount.getAccountName()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                articleSortRequest.setGhId(planAccount.getGhId()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                //测试参数 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 //            articleSortRequest.setStrategy("ArticleRankRandom"); 
														 | 
														
														 | 
														
															 //            articleSortRequest.setStrategy("ArticleRankRandom"); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 //            articleSortRequest.setExcludeLog(true); 
														 | 
														
														 | 
														
															 //            articleSortRequest.setExcludeLog(true); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            articleSortRequest.setStrategy(planAccount.getSortStrategy()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            articleSortRequest.setPublishNum(planAccount.getPublishPreNum()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            if (Objects.equals(PublishGzhPushTypeEnum.auto_group_publish.getVal(), planAccount.getPushType())) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                articleSortRequest.setPublishNum(planAccount.getPublishNum()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            articleSortRequest.setPlanId(planAccount.getPlanId()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            articleSortRequest.setPushType(planAccount.getPushType()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                articleSortRequest.setStrategy(planAccount.getSortStrategy()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                articleSortRequest.setPublishNum(planAccount.getPublishPreNum()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                if (Objects.equals(PublishGzhPushTypeEnum.auto_group_publish.getVal(), planAccount.getPushType())) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    articleSortRequest.setPublishNum(planAccount.getPublishNum()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                articleSortRequest.setPlanId(planAccount.getPlanId()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                articleSortRequest.setPushType(planAccount.getPushType()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            ArticleSortResponse articleSortResponse = sortService.publishArticleSort(articleSortRequest); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            if (articleSortResponse == null || articleSortResponse.getData() == null) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                continue; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            if (CollectionUtils.isEmpty(articleSortResponse.getData().getRank_list())) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                continue; 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            } 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            ArticleSortResponseData data = articleSortResponse.getData(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            if (!CollectionUtils.isEmpty(data.getFilter_list())) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                List<FilterSortContentParam> list = new ArrayList<>(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                for (PublishArticleData publishArticleData : data.getFilter_list()) { 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    FilterSortContentParam param = new FilterSortContentParam(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    param.setFilterReason(publishArticleData.getFilterReason()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    param.setPublishContentId(publishArticleData.getId()); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                    list.add(param); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                ArticleSortResponse articleSortResponse = sortService.publishArticleSort(articleSortRequest); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                if (articleSortResponse == null || articleSortResponse.getData() == null) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    continue; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                ArticleSortResponseData data = articleSortResponse.getData(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                if (!CollectionUtils.isEmpty(data.getFilter_list())) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    List<FilterSortContentParam> list = new ArrayList<>(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    for (PublishArticleData publishArticleData : data.getFilter_list()) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                        FilterSortContentParam param = new FilterSortContentParam(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                        param.setFilterReason(publishArticleData.getFilterReason()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                        param.setPublishContentId(publishArticleData.getId()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                        list.add(param); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    FilterSortParam param = new FilterSortParam(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    param.setFilterSortContentList(list); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    aigcService.filterSortContents(param); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                if (CollectionUtils.isEmpty(articleSortResponse.getData().getRank_list()) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                        || articleSortResponse.getData().getRank_list().size() < planAccount.getPublishPreMinNum()) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    continue; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                //排序结束 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                rankList = data.getRank_list(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            } else { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                List<PublishArticleData> notSortList = new ArrayList<>(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                for (ContentItemVO contentItemVO : longArticleSystemContentVO.getContentItemList()) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    PublishArticleData publishArticleData = new PublishArticleData(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    publishArticleData.setId(contentItemVO.getPublishContentId()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    publishArticleData.setSourceId(contentItemVO.getSourceId()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    publishArticleData.setTitle(contentItemVO.getTitle()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    publishArticleData.setContentPoolType(contentItemVO.getFlowPoolLevelTag()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    notSortList.add(publishArticleData); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 } 
														 | 
														
														 | 
														
															                 } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                FilterSortParam param = new FilterSortParam(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                param.setFilterSortContentList(list); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-                aigcService.filterSortContents(param); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                rankList = notSortList; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             } 
														 | 
														
														 | 
														
															             } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             List<LongArticleSystemPushContentParam> pushContentList = new ArrayList<>(); 
														 | 
														
														 | 
														
															             List<LongArticleSystemPushContentParam> pushContentList = new ArrayList<>(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            //排序结束 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-            List<PublishArticleData> rankList = data.getRank_list(); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             List<Long> sendIds = new ArrayList<>(); 
														 | 
														
														 | 
														
															             List<Long> sendIds = new ArrayList<>(); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															             for (PublishArticleData publishArticleData : rankList) { 
														 | 
														
														 | 
														
															             for (PublishArticleData publishArticleData : rankList) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															                 LongArticleSystemPushContentParam contentParam = new LongArticleSystemPushContentParam(); 
														 | 
														
														 | 
														
															                 LongArticleSystemPushContentParam contentParam = new LongArticleSystemPushContentParam(); 
														 |