|
@@ -76,7 +76,7 @@ public class ContentServiceImpl implements ContentService {
|
|
|
publishMatchContentMapper.insertSelective(publishMatchContent);
|
|
|
}
|
|
|
|
|
|
- public MatchVideo getContent(String contentId, String ghId, Integer publishFlag) {
|
|
|
+ public MatchVideo getContent(String contentId, String ghId, Integer publishFlag) {
|
|
|
MatchVideoExample matchVideoExample = new MatchVideoExample();
|
|
|
matchVideoExample.createCriteria().andGhIdEqualTo(ghId).andContentIdEqualTo(contentId)
|
|
|
.andPublishFlagEqualTo(publishFlag);
|
|
@@ -217,8 +217,8 @@ public class ContentServiceImpl implements ContentService {
|
|
|
return data.getRank_list();
|
|
|
}
|
|
|
|
|
|
- public List<VideoDetail> getPublishVideoDetail(MatchVideo matchVideo, Integer publicFlag) {
|
|
|
- List<CrawlerVideo> contentMiniVideos = getContentMiniVideo(matchVideo.getContentId(), publicFlag);
|
|
|
+ public List<VideoDetail> getPublishVideoDetail(MatchVideo matchVideo, Integer publicFlag, PlanAccount planAccount) {
|
|
|
+ List<CrawlerVideo> contentMiniVideos = getContentMiniVideo(matchVideo.getContentId(), publicFlag, planAccount);
|
|
|
log.info("getPublishVideoDetail contentMiniVideos={}", contentMiniVideos);
|
|
|
if (CollectionUtils.isEmpty(contentMiniVideos)) {
|
|
|
LarkRobotUtil.sendMessage("文章获取小程序为空 matchVideo.getContentId" + matchVideo.getContentId());
|
|
@@ -285,7 +285,7 @@ public class ContentServiceImpl implements ContentService {
|
|
|
}
|
|
|
|
|
|
|
|
|
- public List<CrawlerVideo> getContentMiniVideo(String contentId, Integer publicFlag) {
|
|
|
+ public List<CrawlerVideo> getContentMiniVideo(String contentId, Integer publicFlag, PlanAccount planAccount) {
|
|
|
try {
|
|
|
CrawlerVideoExample example = new CrawlerVideoExample();
|
|
|
example.setOrderByClause("score desc");
|
|
@@ -296,6 +296,16 @@ public class ContentServiceImpl implements ContentService {
|
|
|
criteria.andStatusEqualTo(1).andIsIllegalEqualTo(0);
|
|
|
}
|
|
|
List<CrawlerVideo> crawlerVideoList = crawlerVideoMapper.selectByExample(example);
|
|
|
+ if (planAccount == null) {
|
|
|
+ return crawlerVideoList;
|
|
|
+ }
|
|
|
+ //临时逻辑 该计划返回正常数量小程序
|
|
|
+ if ("20250208065525959973866".equals(planAccount.getPlanId())) {
|
|
|
+ if (crawlerVideoList.size() > 3) {
|
|
|
+ return crawlerVideoList.subList(0, 3);
|
|
|
+ }
|
|
|
+ return crawlerVideoList;
|
|
|
+ }
|
|
|
List<CrawlerVideo> videoList = new ArrayList<>();
|
|
|
if (!CollectionUtils.isEmpty(crawlerVideoList)) {
|
|
|
videoList.add(crawlerVideoList.get(0));
|