|  | @@ -619,42 +619,48 @@ public class CoreServiceImpl implements CoreService {
 | 
	
		
			
				|  |  |              if (publishContent == null) {
 | 
	
		
			
				|  |  |                  continue;
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | -            //获取小程序
 | 
	
		
			
				|  |  | -            List<PublishMiniprogram> publishMiniprogramList = publicContentService.getPublishMiniprograms(publishContent);
 | 
	
		
			
				|  |  | -            //不存在则重新生成
 | 
	
		
			
				|  |  | -            if (CollectionUtils.isEmpty(publishMiniprogramList)) {
 | 
	
		
			
				|  |  | -                if (Objects.equals(publishContent.getSourceType(), SourceTypesEnum.longArticleVideoPoolSource.getVal())) {
 | 
	
		
			
				|  |  | -                    List<VideoDetail> videoDetails = contentService.getOnlyMiniPublishVideoDetail(publishContent);
 | 
	
		
			
				|  |  | -                    log.info("publishContentId={}, videoDetails={}", publishContent.getId(), videoDetails);
 | 
	
		
			
				|  |  | -                    if (CollectionUtils.isEmpty(videoDetails)) {
 | 
	
		
			
				|  |  | -                        continue;
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                    publishMiniprogramList = getPublishMiniprogramList(videoDetails, planAccount, publishContent);
 | 
	
		
			
				|  |  | -                    if (CollectionUtils.isEmpty(publishMiniprogramList)) {
 | 
	
		
			
				|  |  | -                        continue;
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                } else {
 | 
	
		
			
				|  |  | -                    MatchVideo matchVideo = contentService.getMatchVideo(publishContent, planAccount);
 | 
	
		
			
				|  |  | -                    if (matchVideo == null) {
 | 
	
		
			
				|  |  | -                        continue;
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                    List<VideoDetail> videoDetails = contentService.getPublishVideoDetail(publishContent, planAccount, matchVideo);
 | 
	
		
			
				|  |  | -                    log.info("publishContentId={}, videoDetails={}", publishContent.getId(), videoDetails);
 | 
	
		
			
				|  |  | -                    if (CollectionUtils.isEmpty(videoDetails)) {
 | 
	
		
			
				|  |  | -                        continue;
 | 
	
		
			
				|  |  | -                    }
 | 
	
		
			
				|  |  | -                    publishMiniprogramList = getPublishMiniprogramList(videoDetails, planAccount, publishContent);
 | 
	
		
			
				|  |  | -                    if (CollectionUtils.isEmpty(publishMiniprogramList)) {
 | 
	
		
			
				|  |  | -                        continue;
 | 
	
		
			
				|  |  | +            //临时逻辑 代运营计划不发小程序
 | 
	
		
			
				|  |  | +            boolean isDYY = StringUtils.isNotEmpty(planAccount.getPlanName()) && planAccount.getPlanName().contains("代运营");
 | 
	
		
			
				|  |  | +            //判断是否插入小程序
 | 
	
		
			
				|  |  | +            if (!isDYY && planAccount.getMiniprogramInsertFlag() != null && planAccount.getMiniprogramInsertFlag() == 1) {
 | 
	
		
			
				|  |  | +                //获取小程序
 | 
	
		
			
				|  |  | +                List<PublishMiniprogram> publishMiniprogramList = publicContentService.getPublishMiniprograms(publishContent);
 | 
	
		
			
				|  |  | +                //不存在则重新生成
 | 
	
		
			
				|  |  | +                if (CollectionUtils.isEmpty(publishMiniprogramList)) {
 | 
	
		
			
				|  |  | +                    if (Objects.equals(publishContent.getSourceType(), SourceTypesEnum.longArticleVideoPoolSource.getVal())) {
 | 
	
		
			
				|  |  | +                        List<VideoDetail> videoDetails = contentService.getOnlyMiniPublishVideoDetail(publishContent);
 | 
	
		
			
				|  |  | +                        log.info("publishContentId={}, videoDetails={}", publishContent.getId(), videoDetails);
 | 
	
		
			
				|  |  | +                        if (CollectionUtils.isEmpty(videoDetails)) {
 | 
	
		
			
				|  |  | +                            continue;
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                        publishMiniprogramList = getPublishMiniprogramList(videoDetails, planAccount, publishContent);
 | 
	
		
			
				|  |  | +                        if (CollectionUtils.isEmpty(publishMiniprogramList)) {
 | 
	
		
			
				|  |  | +                            continue;
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                    } else {
 | 
	
		
			
				|  |  | +                        MatchVideo matchVideo = contentService.getMatchVideo(publishContent, planAccount);
 | 
	
		
			
				|  |  | +                        if (matchVideo == null) {
 | 
	
		
			
				|  |  | +                            continue;
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                        List<VideoDetail> videoDetails = contentService.getPublishVideoDetail(publishContent, planAccount, matchVideo);
 | 
	
		
			
				|  |  | +                        log.info("publishContentId={}, videoDetails={}", publishContent.getId(), videoDetails);
 | 
	
		
			
				|  |  | +                        if (CollectionUtils.isEmpty(videoDetails)) {
 | 
	
		
			
				|  |  | +                            continue;
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                        publishMiniprogramList = getPublishMiniprogramList(videoDetails, planAccount, publishContent);
 | 
	
		
			
				|  |  | +                        if (CollectionUtils.isEmpty(publishMiniprogramList)) {
 | 
	
		
			
				|  |  | +                            continue;
 | 
	
		
			
				|  |  | +                        }
 | 
	
		
			
				|  |  | +                        contentService.updateMatchContent(publishContent, publishMiniprogramList, matchVideo);
 | 
	
		
			
				|  |  |                      }
 | 
	
		
			
				|  |  | -                    contentService.updateMatchContent(publishContent, publishMiniprogramList, matchVideo);
 | 
	
		
			
				|  |  |                  }
 | 
	
		
			
				|  |  | +                log.info("publishMiniprogramList={}", publishMiniprogramList);
 | 
	
		
			
				|  |  | +                List<PublishMiniprogramParam> publishCardList = getPublishCardList(publishMiniprogramList);
 | 
	
		
			
				|  |  | +                contentParam.setMiniprogramCardList(publishCardList);
 | 
	
		
			
				|  |  |              }
 | 
	
		
			
				|  |  | +
 | 
	
		
			
				|  |  |              sendIds.add(publishContent.getId());
 | 
	
		
			
				|  |  | -            log.info("publishMiniprogramList={}", publishMiniprogramList);
 | 
	
		
			
				|  |  | -            List<PublishMiniprogramParam> publishCardList = getPublishCardList(publishMiniprogramList);
 | 
	
		
			
				|  |  |              contentParam.setPublishContentId(publishContent.getPublishContentId());
 | 
	
		
			
				|  |  | -            contentParam.setMiniprogramCardList(publishCardList);
 | 
	
		
			
				|  |  |              pushContentList.add(contentParam);
 | 
	
		
			
				|  |  |          }
 | 
	
		
			
				|  |  |          CreatePushTaskParam gzhPushParam = getCreatePushTaskParam(planAccount, pushContentList);
 |