From 2226679bda25ddf977f12367a9a37fcf4e377249 Mon Sep 17 00:00:00 2001 From: xiangpei <xiangpei@timesnew.cn> Date: 星期二, 17 六月 2025 11:00:53 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/dev' into dev --- framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java | 23 +++++++++++++++++++++-- 1 files changed, 21 insertions(+), 2 deletions(-) diff --git a/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java b/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java index 7e79858..4fee572 100644 --- a/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java +++ b/framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java @@ -317,8 +317,8 @@ v.setTagList(tagMap.get(v.getId())); v.setCollected(CollectionUtils.isNotEmpty(collectMap.get(v.getId()))); if (VideoContentTypeEnum.VIDEO.getValue().equals(v.getVideoContentType())) { - // v.setVideoUrl(cosUtil.getPreviewUrl(v.getVideoFileKey())); - v.setVideoUrl("https://videos.pexels.com/video-files/13602965/13602965-hd_1920_1080_30fps.mp4"); + v.setVideoUrl(cosUtil.getPreviewUrl(v.getVideoFileKey())); +// v.setVideoUrl("https://videos.pexels.com/video-files/13602965/13602965-hd_1920_1080_30fps.mp4"); } else if (VideoContentTypeEnum.IMG.getValue().equals(v.getVideoContentType()) && StringUtils.isNotBlank(v.getVideoImgs())) { v.setImgs(JSON.parseArray(v.getVideoImgs(), String.class).stream().map(fileKey -> cosUtil.getPreviewUrl(fileKey)).collect(Collectors.toList())); } @@ -330,6 +330,25 @@ } @Override + public Result healthRecommendVideo(WxHealthVideoQuery query) { + IPage<WxVideoVO> page = PageUtil.getPage(query, WxVideoVO.class); + //鑾峰彇澶у仴搴疯棰戝垪琛� + baseMapper.recommendHealthVideo(page,query); + if (page.getTotal() > 0) { + page.getRecords().forEach(v -> { + if (VideoContentTypeEnum.VIDEO.getValue().equals(v.getVideoContentType())) { + v.setVideoUrl(cosUtil.getPreviewUrl(v.getVideoFileKey())); +// v.setVideoUrl("https://videos.pexels.com/video-files/13602965/13602965-hd_1920_1080_30fps.mp4"); + } else if (VideoContentTypeEnum.IMG.getValue().equals(v.getVideoContentType()) && StringUtils.isNotBlank(v.getVideoImgs())) { + v.setImgs(JSON.parseArray(v.getVideoImgs(), String.class).stream().map(cosUtil::getPreviewUrl).collect(Collectors.toList())); + } + v.setCoverUrl(cosUtil.getPreviewUrl(v.getCoverFileKey())); + }); + } + return Result.ok().data(page.getRecords()); + } + + @Override @Transactional(rollbackFor = Exception.class) public void updateCollectNumBatch(List<CollectTypeNumVO> numList) { // 鎸�500鏉℃暟鎹繘琛屾媶鍒� -- Gitblit v1.8.0