From 8e25be6ee345ce5d11918943dcc41fa1d4b3a902 Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期四, 12 六月 2025 16:12:14 +0800
Subject: [PATCH] 视频发布支持图片

---
 framework/src/main/java/cn/lili/modules/lmk/domain/form/WxVideoForm.java       |    4 ++--
 framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java |    4 ++++
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/framework/src/main/java/cn/lili/modules/lmk/domain/form/WxVideoForm.java b/framework/src/main/java/cn/lili/modules/lmk/domain/form/WxVideoForm.java
index 791a4bb..ab5fce0 100644
--- a/framework/src/main/java/cn/lili/modules/lmk/domain/form/WxVideoForm.java
+++ b/framework/src/main/java/cn/lili/modules/lmk/domain/form/WxVideoForm.java
@@ -29,7 +29,7 @@
 public class WxVideoForm extends AbsForm {
 
 
-    @NotBlank(message = "瑙嗛涓嶈兘涓虹┖", groups = {Add.class, Update.class})
+//    @NotBlank(message = "瑙嗛涓嶈兘涓虹┖", groups = {Add.class, Update.class})
     @ApiModelProperty("瑙嗛")
     private String videoFileKey;
 
@@ -38,7 +38,7 @@
     private String title;
 
     @ApiModelProperty("瑙嗛灏侀潰")
-    @NotBlank(message = "瑙嗛灏侀潰涓嶈兘涓虹┖", groups = {Add.class, Update.class})
+//    @NotBlank(message = "瑙嗛灏侀潰涓嶈兘涓虹┖", groups = {Add.class, Update.class})
     private String cover;
 
     @ApiModelProperty("瑙嗛鍐呭绫诲瀷锛氳棰戙�佸浘鐗�")
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 a9875df..0468ed1 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
@@ -13,6 +13,7 @@
 import cn.lili.modules.member.service.FootprintService;
 import cn.lili.modules.member.service.MemberService;
 import cn.lili.utils.COSUtil;
+import com.alibaba.fastjson.JSON;
 import com.baomidou.mybatisplus.core.metadata.IPage;
 import cn.lili.modules.lmk.mapper.VideoMapper;
 import cn.lili.base.Result;
@@ -155,6 +156,9 @@
         video.setStatus(VideoStatusEnum.AUDITING.getValue());
         video.setCoverUrl(form.getCover());
         video.setVideoType(VideoTypeEnum.VIDEO.getValue());
+        if (VideoContentTypeEnum.IMG.getValue().equals(form.getVideoContentType())) {
+            video.setVideoImgs(JSON.toJSONString(form.getVideoImgs()));
+        }
         baseMapper.insert(video);
         // 2.澶勭悊鏍囩
         List<VideoTagRef> videoTagRefs = form.getTags().stream().map(tag -> {

--
Gitblit v1.8.0