From 75f9783d5a70a5f037e3b34dc0e479069e63c0e9 Mon Sep 17 00:00:00 2001
From: peng <peng.com>
Date: 星期二, 17 六月 2025 10:54:15 +0800
Subject: [PATCH] update 修改后台/销售端商品上架
---
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 dd10506..444f83a 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
@@ -304,8 +304,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()));
}
@@ -317,6 +317,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