| 
					
				 | 
			
			
				@@ -396,6 +396,7 @@ public class CoreServiceImpl implements CoreService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             waitingSortParam.setPageNum(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             waitingSortParam.setPageSize(planAccount.getPublishPreNum()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             LongArticleSystemContentVO longArticleSystemContentVO = aigcService.listWaitingSortContents(waitingSortParam); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+            log.info("aigcService.listWaitingSortContents={}", longArticleSystemContentVO); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (longArticleSystemContentVO == null 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     || longArticleSystemContentVO.getTotalCount() < planAccount.getPublishPreMinNum() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     || CollectionUtils.isEmpty(longArticleSystemContentVO.getContentItemList()) 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -469,45 +470,38 @@ public class CoreServiceImpl implements CoreService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 sendIds.add(publishContent.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 //获取小程序 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                List<PublishMiniprogram> publishMiniprogramList = contentService.getPublishMiniprograms(publishArticleData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                List<PublishMiniprogram> publishMiniprogramList = publicContentService.getPublishMiniprograms(publishArticleData); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 //不存在则重新生成 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (CollectionUtils.isEmpty(publishMiniprogramList)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     List<CrawlerVideo> contentVideos = 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                             contentService.getContentMiniVideo(publishArticleData, planAccount); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     List<VideoDetail> videoDetails = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    //发布小程序 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    for (CrawlerVideo crawlerVideo : contentVideos) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        Integer crawlerVideoId = crawlerVideo.getId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        String videoOssPath = crawlerVideo.getVideoOssPath(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        String platform = crawlerVideo.getPlatform(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        String userId = crawlerVideo.getUserId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        String traceId = crawlerVideo.getTraceId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        String kimiTitle; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        LongArticlesText kimiText = kimiService.getKimiText(crawlerVideo.getContentId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        if (kimiText != null && StringUtils.isNotEmpty(kimiText.getKimiTitle())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            kimiTitle = kimiText.getKimiTitle(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            kimiTitle = crawlerVideo.getVideoTitle(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        VideoDetail publish = videoService.publish(crawlerVideoId, videoOssPath, userId, kimiTitle, platform, traceId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        if (publish == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                            continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    if (!CollectionUtils.isEmpty(contentVideos)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        //发布小程序 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        for (CrawlerVideo crawlerVideo : contentVideos) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            Integer crawlerVideoId = crawlerVideo.getId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            String videoOssPath = crawlerVideo.getVideoOssPath(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            String platform = crawlerVideo.getPlatform(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            String userId = crawlerVideo.getUserId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            String traceId = crawlerVideo.getTraceId(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            String kimiTitle; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            LongArticlesText kimiText = kimiService.getKimiText(crawlerVideo.getContentId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            if (kimiText != null && StringUtils.isNotEmpty(kimiText.getKimiTitle())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                kimiTitle = kimiText.getKimiTitle(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            } else { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                kimiTitle = crawlerVideo.getVideoTitle(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            VideoDetail publish = videoService.publish(crawlerVideoId, videoOssPath, userId, kimiTitle, platform, traceId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            if (publish == null) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                                continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                            videoDetails.add(publish); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        videoDetails.add(publish); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    log.info("videoDetails={}", videoDetails); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if (videoDetails.size() < 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        MatchMiniprogramStatusParam statusParam = new MatchMiniprogramStatusParam(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        statusParam.setStatus(3); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        statusParam.setPublishContentId(publishContent.getPublishContentId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        statusParam.setErrorMsg("小程序视频数量不足"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        aigcService.updateMatchMiniprogramStatus(statusParam); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        PublishContent update = new PublishContent(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        update.setId(publishContent.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        update.setStatus(3); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        update.setReason("小程序数量不足"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        publishContentMapper.updateByPrimaryKeySelective(update); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                        publicContentService.delPublishContent(publishContent); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     String ghId = planAccount.getGhId(); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -586,17 +580,7 @@ public class CoreServiceImpl implements CoreService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     publishCardList.add(param); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (publishCardList.size() < 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    MatchMiniprogramStatusParam statusParam = new MatchMiniprogramStatusParam(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    statusParam.setStatus(3); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    statusParam.setPublishContentId(publishContent.getPublishContentId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    statusParam.setErrorMsg("小程序视频数量不足"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    aigcService.updateMatchMiniprogramStatus(statusParam); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				- 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    PublishContent update = new PublishContent(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    update.setId(publishContent.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    update.setStatus(3); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    update.setReason("小程序数量不足"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    publishContentMapper.updateByPrimaryKeySelective(update); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    publicContentService.delPublishContent(publishContent); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 contentParam.setPublishContentId(publishContent.getPublishContentId()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -688,7 +672,7 @@ public class CoreServiceImpl implements CoreService { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             PlanAccount planAccount = planAccountService.getPlanAccountById(planAccountId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             if (updateStatus == 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 for (PublishContent publishContent : entry.getValue()) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    contentService.updatePublishContentStatus(updateStatus, publishContent.getId(), pushStatusVO.getErrorMsg()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    publicContentService.updatePublishContentStatus(updateStatus, publishContent.getId(), pushStatusVO.getErrorMsg()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     if (StringUtils.isNotEmpty(publishContent.getTraceId())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                         videoService.miniProgramVideoOff(publishContent.getTraceId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                     } else { 
			 |