2ca169c85f61256fb5185c078dba1bfef2be5066..baa730b5518b5f73c14d0af5868641299b3fe2e4
2025-06-12 xiangpei
视频图片处理
baa730 对比 | 目录
2025-06-12 xiangpei
视频发布支持图片
8e25be 对比 | 目录
2025-06-12 xiangpei
视频表增加字段
8bfcdc 对比 | 目录
2025-06-12 xiangpei
视频表增加字段
890703 对比 | 目录
2025-06-12 xiangpei
视频地址暂时写死
10b9fc 对比 | 目录
15个文件已修改
2个文件已添加
1 文件已重命名
304 ■■■■ 已修改文件
buyer-api/src/main/java/cn/lili/controller/lmk/VideoController.java 12 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
buyer-api/src/main/java/cn/lili/controller/lmk/VideoTagController.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/cos/CosSTS.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/domain/entity/Video.java 14 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/domain/form/WxVideoForm.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/domain/query/AuthorVideoQuery.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/domain/query/ManagerVideoQuery.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/domain/query/VideoQuery.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/domain/vo/VideoVO.java 12 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/domain/vo/WxVideoVO.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/enums/general/VideoContentTypeEnum.java 46 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/enums/general/VideoTypeEnum.java 47 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/mapper/VideoMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/service/VideoService.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java 48 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/java/cn/lili/utils/COSUtil.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
framework/src/main/resources/mapper/lmk/VideoMapper.xml 41 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manager-api/src/main/java/cn/lili/controller/lmk/VideoController.java 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
buyer-api/src/main/java/cn/lili/controller/lmk/VideoController.java
@@ -1,27 +1,21 @@
package cn.lili.controller.lmk;
import cn.lili.base.AbsQuery;
import cn.lili.group.Update;
import cn.lili.group.Add;
import cn.lili.modules.lmk.domain.form.VideoFootPrintForm;
import cn.lili.modules.lmk.domain.form.VideoHomePageInfoForm;
import cn.lili.modules.lmk.domain.form.WxVideoForm;
import cn.lili.modules.lmk.domain.query.AuthorVideoQuery;
import cn.lili.modules.member.entity.dos.FootPrint;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import lombok.RequiredArgsConstructor;
import java.util.List;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.NotEmpty;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import cn.lili.modules.lmk.service.VideoService;
import cn.lili.base.Result;
import cn.lili.modules.lmk.domain.form.VideoForm;
import cn.lili.modules.lmk.domain.query.VideoQuery;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
import org.springframework.web.multipart.MultipartFile;
/**
 * 视频内容 前端控制器
@@ -40,13 +34,13 @@
    @PostMapping("/publish")
    @ApiOperation(value = "发布视频", notes = "发布视频")
    public Result publish(@RequestBody @Validated({Add.class}) VideoForm form) {
    public Result publish(@RequestBody @Validated({Add.class}) WxVideoForm form) {
        return videoService.publish(form);
    }
    @PutMapping
    @ApiOperation(value = "修改", notes = "修改")
    public Result update(@RequestBody @Validated(Update.class) VideoForm form) {
    public Result update(@RequestBody @Validated(Update.class) WxVideoForm form) {
        return videoService.update(form);
    }
buyer-api/src/main/java/cn/lili/controller/lmk/VideoTagController.java
@@ -1,20 +1,13 @@
package cn.lili.controller.lmk;
import cn.lili.base.Result;
import cn.lili.group.Update;
import cn.lili.modules.lmk.domain.form.VideoForm;
import cn.lili.modules.lmk.domain.query.VideoQuery;
import cn.lili.modules.lmk.domain.query.WxVideoTagQuery;
import cn.lili.modules.lmk.service.VideoService;
import cn.lili.modules.lmk.service.VideoTagService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.validation.constraints.NotEmpty;
import java.util.List;
/**
 * 视频标签 前端控制器
framework/src/main/java/cn/lili/cos/CosSTS.java
@@ -36,5 +36,6 @@
    @ApiModelProperty("region")
    private String region;
    @ApiModelProperty("端点,用于拼接filekey直接预览")
    private String endpoint;
}
framework/src/main/java/cn/lili/modules/lmk/domain/entity/Video.java
@@ -45,9 +45,17 @@
    /** 视频标题 */
    private String title;
    @TableField("goods_id")
    /** 商品id */
    private String goodsId;
    @TableField("video_content_type")
    /** 视频内容类型:视频、图片 */
    private String videoContentType;
    @TableField("video_type")
    /** 视频类型:视频、大健康、神厨 */
    private String videoType;
    @TableField("video_imgs")
    /** 图片地址(json数组),对应video_type = 图片 */
    private String videoImgs;
    @TableField("goods_view_num")
    /** 商品查看次数 */
framework/src/main/java/cn/lili/modules/lmk/domain/form/WxVideoForm.java
File was renamed from framework/src/main/java/cn/lili/modules/lmk/domain/form/VideoForm.java
@@ -9,14 +9,13 @@
import javax.validation.Valid;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
import org.springframework.lang.NonNull;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
/**
@@ -27,10 +26,10 @@
 */
@Data
@ApiModel(value = "Video表单", description = "视频内容表单")
public class VideoForm extends AbsForm {
public class WxVideoForm extends AbsForm {
    @NotBlank(message = "视频不能为空", groups = {Add.class, Update.class})
//    @NotBlank(message = "视频不能为空", groups = {Add.class, Update.class})
    @ApiModelProperty("视频")
    private String videoFileKey;
@@ -39,8 +38,15 @@
    private String title;
    @ApiModelProperty("视频封面")
    @NotBlank(message = "视频封面不能为空", groups = {Add.class, Update.class})
//    @NotBlank(message = "视频封面不能为空", groups = {Add.class, Update.class})
    private String cover;
    @ApiModelProperty("视频内容类型:视频、图片")
    @NotBlank(message = "视频类型不能为空")
    private String videoContentType;
    @ApiModelProperty("图片列表,如果videoContentType是图片,则必须传值")
    private List<String> videoImgs;
    @ApiModelProperty("视频标签")
    @Length(max = 5, message = "最多只能添加五个标签")
@@ -60,7 +66,7 @@
    @Valid
    private FileInfoForm fileInfo;
    public static Video getEntityByForm(@NonNull VideoForm form, Video entity) {
    public static Video getEntityByForm(@NonNull WxVideoForm form, Video entity) {
        if(entity == null) {
          entity = new Video();
        }
framework/src/main/java/cn/lili/modules/lmk/domain/query/AuthorVideoQuery.java
@@ -1,6 +1,7 @@
package cn.lili.modules.lmk.domain.query;
import cn.lili.base.AbsQuery;
import cn.lili.modules.lmk.enums.general.VideoTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -24,5 +25,10 @@
    @ApiModelProperty(hidden = true)
    private Boolean authorSelf;
    /**
     * @see cn.lili.modules.lmk.enums.general.VideoTypeEnum
     */
    @ApiModelProperty("视频类型:视频、大健康、神厨,默认不传查视频")
    private String videoType = VideoTypeEnum.VIDEO.getValue();
}
framework/src/main/java/cn/lili/modules/lmk/domain/query/ManagerVideoQuery.java
@@ -1,6 +1,7 @@
package cn.lili.modules.lmk.domain.query;
import cn.lili.base.AbsQuery;
import cn.lili.modules.lmk.enums.general.VideoTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@@ -29,5 +30,10 @@
    @ApiModelProperty("状态")
    private String status;
    /**
     * @see cn.lili.modules.lmk.enums.general.VideoTypeEnum
     */
    @ApiModelProperty("视频类型:视频、大健康、神厨,默认不传查视频")
    private String videoType = VideoTypeEnum.VIDEO.getValue();
}
framework/src/main/java/cn/lili/modules/lmk/domain/query/VideoQuery.java
@@ -2,6 +2,8 @@
import cn.lili.base.AbsQuery;
import java.util.List;
import cn.lili.modules.lmk.enums.general.VideoTypeEnum;
import org.springframework.lang.NonNull;
import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;
@@ -25,5 +27,10 @@
    @ApiModelProperty("视频来源:recommend推荐、author某作者的视频、collect某作者收藏的视频")
    private String videoFrom;
    /**
     * @see cn.lili.modules.lmk.enums.general.VideoTypeEnum
     */
    @ApiModelProperty("视频类型:视频、大健康、神厨,默认不传查视频")
    private String videoType = VideoTypeEnum.VIDEO.getValue();
}
framework/src/main/java/cn/lili/modules/lmk/domain/vo/VideoVO.java
@@ -38,6 +38,18 @@
    @ApiModelProperty("视频标签")
    private List<SimpleVideoTagVO> tagList;
    @ApiModelProperty("视频内容类型:视频、图片")
    private String videoContentType;
    @ApiModelProperty("视频类型:视频、大健康、神厨")
    private String videoType;
    @ApiModelProperty(value = "图片列表,json数组", hidden = true)
    private String videoImgs;
    @ApiModelProperty("图片列表")
    private List<String> imgs;
    /** 视频填充模式 */
    @ApiModelProperty("视频填充模式")
    private String videoFit;
framework/src/main/java/cn/lili/modules/lmk/domain/vo/WxVideoVO.java
@@ -42,6 +42,24 @@
    private String videoFileKey;
    private String videoUrl;
    /**
     * @see cn.lili.modules.lmk.enums.general.VideoContentTypeEnum
     */
    @ApiModelProperty("视频内容类型:视频、图片")
    private String videoContentType;
    /**
     * @see cn.lili.modules.lmk.enums.general.VideoTypeEnum
     */
    @ApiModelProperty("视频类型:视频、大健康、神厨")
    private String videoType;
    @ApiModelProperty("图集-json数组")
    private String videoImgs;
    @ApiModelProperty("图集")
    private List<String> imgs;
    @ApiModelProperty("视频标签")
    private List<SimpleVideoTagVO> tagList;
framework/src/main/java/cn/lili/modules/lmk/enums/general/VideoContentTypeEnum.java
New file
@@ -0,0 +1,46 @@
package cn.lili.modules.lmk.enums.general;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;
/**
 * 视频内容类型
 *
 * @author:xp
 * @date:2025/5/14 10:30
 */
@Getter
public enum VideoContentTypeEnum {
    VIDEO("video", "视频"),
    IMG("img", "图片"),
    ;
    private final String value;
    private final String desc;
    VideoContentTypeEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }
    /**
     * 获取含义
     *
     * @param value
     * @return
     */
    public static String getDescByValue(String value) {
        if (StringUtils.isBlank(value)) {
            return null;
        }
        for (VideoContentTypeEnum e : VideoContentTypeEnum.values()){
            if (value.equals(e.getValue())) {
                return e.getDesc();
            }
        }
        return null;
    }
}
framework/src/main/java/cn/lili/modules/lmk/enums/general/VideoTypeEnum.java
New file
@@ -0,0 +1,47 @@
package cn.lili.modules.lmk.enums.general;
import lombok.Getter;
import org.apache.commons.lang3.StringUtils;
/**
 * 视频类型
 *
 * @author:xp
 * @date:2025/5/14 10:30
 */
@Getter
public enum VideoTypeEnum {
    VIDEO("video", "视频"),
    HEALTH("health", "大健康"),
    COOK("cook", "神厨"),
    ;
    private final String value;
    private final String desc;
    VideoTypeEnum(String value, String desc) {
        this.value = value;
        this.desc = desc;
    }
    /**
     * 获取含义
     *
     * @param value
     * @return
     */
    public static String getDescByValue(String value) {
        if (StringUtils.isBlank(value)) {
            return null;
        }
        for (VideoTypeEnum e : VideoTypeEnum.values()){
            if (value.equals(e.getValue())) {
                return e.getDesc();
            }
        }
        return null;
    }
}
framework/src/main/java/cn/lili/modules/lmk/mapper/VideoMapper.java
@@ -49,7 +49,7 @@
     *
     * @return
     */
    IPage recommendVideo(IPage page);
    IPage recommendVideo(IPage page, @Param("query") VideoQuery query);
    /**
     * 批量更新视频收藏数量
framework/src/main/java/cn/lili/modules/lmk/service/VideoService.java
@@ -23,14 +23,14 @@
     * @param form
     * @return
     */
    Result add(VideoForm form);
    Result add(WxVideoForm form);
    /**
     * 修改
     * @param form
     * @return
     */
    Result update(VideoForm form);
    Result update(WxVideoForm form);
    /**
     * 批量删除
@@ -72,7 +72,7 @@
     * @param form
     * @return
     */
    Result publish(VideoForm form);
    Result publish(WxVideoForm form);
    /**
     * 平台端视频分页
framework/src/main/java/cn/lili/modules/lmk/service/impl/VideoServiceImpl.java
@@ -6,16 +6,14 @@
import cn.lili.modules.lmk.domain.query.AuthorVideoQuery;
import cn.lili.modules.lmk.domain.query.ManagerVideoQuery;
import cn.lili.modules.lmk.domain.vo.*;
import cn.lili.modules.lmk.enums.general.TagCreateTypeEnum;
import cn.lili.modules.lmk.enums.general.VideoStatusEnum;
import cn.lili.modules.lmk.enums.general.VideoSupportOpEnum;
import cn.lili.modules.lmk.enums.general.ViewTypeEnum;
import cn.lili.modules.lmk.enums.general.*;
import cn.lili.modules.lmk.service.*;
import cn.lili.modules.member.entity.dos.FootPrint;
import cn.lili.modules.member.entity.dos.Member;
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;
@@ -65,8 +63,8 @@
     * @return
     */
    @Override
    public Result add(VideoForm form) {
        Video entity = VideoForm.getEntityByForm(form, null);
    public Result add(WxVideoForm form) {
        Video entity = WxVideoForm.getEntityByForm(form, null);
        baseMapper.insert(entity);
        return Result.ok("添加成功");
    }
@@ -77,7 +75,7 @@
     * @return
     */
    @Override
    public Result update(VideoForm form) {
    public Result update(WxVideoForm form) {
        Video entity = baseMapper.selectById(form.getId());
        // 为空抛IllegalArgumentException,做全局异常处理
@@ -132,7 +130,11 @@
        Assert.notNull(vo, "记录不存在");
        List<SimpleVideoTagVO> tags = videoTagRefService.getTagsByVideoIds(Arrays.asList(id));
        vo.setTagList(tags);
        vo.setVideoUrl(cosUtil.getPreviewUrl(vo.getVideoFileKey()));
        if (VideoContentTypeEnum.VIDEO.getValue().equals(vo.getVideoContentType())) {
            vo.setVideoUrl(cosUtil.getPreviewUrl(vo.getVideoFileKey()));
        } else if (VideoContentTypeEnum.IMG.getValue().equals(vo.getVideoContentType()) && StringUtils.isNotBlank(vo.getVideoImgs())) {
            vo.setImgs(JSON.parseArray(vo.getVideoImgs(), String.class).stream().map(fileKey -> cosUtil.getPreviewUrl(fileKey)).collect(Collectors.toList()));
        }
        return Result.ok().data(vo);
    }
@@ -151,12 +153,16 @@
    @Override
    @Transactional(rollbackFor = Exception.class)
    public Result publish(VideoForm form) {
    public Result publish(WxVideoForm form) {
        // 1.保存视频
        Video video = VideoForm.getEntityByForm(form, null);
        Video video = WxVideoForm.getEntityByForm(form, null);
        video.setAuthorId(UserContext.getCurrentUserId());
        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 -> {
@@ -268,7 +274,7 @@
        IPage<WxVideoVO> page = PageUtil.getPage(query, WxVideoVO.class);
        switch (query.getVideoFrom()) {
            case "recommend":
                baseMapper.recommendVideo(page);
                baseMapper.recommendVideo(page, query);
                break;
            case "author":
                AuthorVideoQuery query1 = new AuthorVideoQuery();
@@ -297,8 +303,12 @@
                v.setGoods(new VideoGoodsVO());
                v.setTagList(tagMap.get(v.getId()));
                v.setCollected(CollectionUtils.isNotEmpty(collectMap.get(v.getId())));
                v.setVideoUrl(cosUtil.getPreviewUrl(v.getVideoFileKey()));
//                v.setVideoUrl("https://videos.pexels.com/video-files/13602965/13602965-hd_1920_1080_30fps.mp4");
                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(fileKey -> cosUtil.getPreviewUrl(fileKey)).collect(Collectors.toList()));
                }
                v.setCoverUrl(cosUtil.getPreviewUrl(v.getCoverFileKey()));
                v.setSubscribeThisAuthor(subscribes.contains(v.getAuthorId()));
            });
@@ -359,8 +369,8 @@
        baseMapper.getAuthorVideoPage(page, query);
        for (WxVideoVO vo : page.getRecords()) {
            vo.setCoverUrl(cosUtil.getPreviewUrl(vo.getCoverFileKey()));
            vo.setVideoUrl(cosUtil.getPreviewUrl(vo.getVideoFileKey()));
//            vo.setVideoUrl("https://videos.pexels.com/video-files/13602965/13602965-hd_1920_1080_30fps.mp4");
//            vo.setVideoUrl(cosUtil.getPreviewUrl(vo.getVideoFileKey()));
            vo.setVideoUrl("https://videos.pexels.com/video-files/13602965/13602965-hd_1920_1080_30fps.mp4");
            vo.setOptions(VideoSupportOpEnum.getVideoOpByStatus(vo.getStatus()));
        }
        return Result.ok().data(page.getRecords()).total(page.getTotal());
@@ -372,8 +382,8 @@
        baseMapper.getAuthorCollectVideoPage(page, query);
        for (WxVideoVO vo : page.getRecords()) {
            vo.setCoverUrl(cosUtil.getPreviewUrl(vo.getCoverFileKey()));
            vo.setVideoUrl(cosUtil.getPreviewUrl(vo.getVideoFileKey()));
//            vo.setVideoUrl("https://videos.pexels.com/video-files/13602965/13602965-hd_1920_1080_30fps.mp4");
//            vo.setVideoUrl(cosUtil.getPreviewUrl(vo.getVideoFileKey()));
            vo.setVideoUrl("https://videos.pexels.com/video-files/13602965/13602965-hd_1920_1080_30fps.mp4");
            vo.setCollected(Boolean.TRUE);
        }
        return Result.ok().data(page.getRecords()).total(page.getTotal());
@@ -401,8 +411,8 @@
            return Result.error("视频不存在");
        }
        vo.setCoverUrl(cosUtil.getPreviewUrl(vo.getCoverFileKey()));
        vo.setVideoUrl(cosUtil.getPreviewUrl(vo.getVideoFileKey()));
//        vo.setVideoUrl("https://videos.pexels.com/video-files/13602965/13602965-hd_1920_1080_30fps.mp4");
//        vo.setVideoUrl(cosUtil.getPreviewUrl(vo.getVideoFileKey()));
        vo.setVideoUrl("https://videos.pexels.com/video-files/13602965/13602965-hd_1920_1080_30fps.mp4");
        List<WxVideoTagForm> tags = videoTagRefService.getTagsByVideoIds(Arrays.asList(vo.getId()))
                .stream()
                .map(i -> {
framework/src/main/java/cn/lili/utils/COSUtil.java
@@ -114,6 +114,7 @@
            cosSTS.setStsEndTime(cosSTS.getStsStartTime() + cosConfigProperty.getDurationSeconds() - 30);
            cosSTS.setBucket(cosConfigProperty.getBucket());
            cosSTS.setRegion(cosConfigProperty.getRegion());
            cosSTS.setEndpoint(cosConfigProperty.getEndpoint());
            return cosSTS;
        } catch (Exception e) {
            e.printStackTrace();
framework/src/main/resources/mapper/lmk/VideoMapper.xml
@@ -23,6 +23,9 @@
        <result column="weight" property="weight" />
        <result column="audit_pass_time" property="auditPassTime" />
        <result column="update_time" property="updateTime" />
        <result column="video_content_type" property="videoContentType" />
        <result column="video_type" property="videoType" />
        <result column="video_imgs" property="videoImgs" />
    </resultMap>
    <!-- 微信推荐视频 -->
@@ -38,6 +41,9 @@
        <result column="collect_num" property="collectNum" />
        <result column="comment_num" property="commentNum" />
        <result column="status" property="status" />
        <result column="video_content_type" property="videoContentType" />
        <result column="video_type" property="videoType" />
        <result column="video_imgs" property="videoImgs" />
    </resultMap>
@@ -49,7 +55,6 @@
            LV.video_duration,
            LV.video_file_key,
            LV.title,
            LV.goods_id,
            LV.goods_view_num,
            LV.goods_order_num,
            LV.recommend,
@@ -60,6 +65,9 @@
            LV.weight,
            LV.audit_pass_time,
            LV.update_time,
            LV.video_content_type,
            LV.video_type,
            LV.video_imgs,
            LV.id,
            LM.nick_name as authorName
        FROM
@@ -78,7 +86,6 @@
            LV.video_duration,
            LV.video_file_key,
            LV.title,
            LV.goods_id,
            LV.goods_view_num,
            LV.goods_order_num,
            LV.recommend,
@@ -89,6 +96,9 @@
            LV.weight,
            LV.audit_pass_time,
            LV.update_time,
            LV.video_content_type,
            LV.video_type,
            LV.video_imgs,
            LV.id,
            LM.nick_name as authorName
        FROM
@@ -107,7 +117,6 @@
            LV.video_duration,
            LV.video_file_key,
            LV.title,
            LV.goods_id,
            LV.goods_view_num,
            LV.goods_order_num,
            LV.recommend,
@@ -118,6 +127,9 @@
            LV.weight,
            LV.audit_pass_time,
            LV.update_time,
            LV.video_content_type,
            LV.video_type,
            LV.video_imgs,
            LV.id,
            LM.nick_name as authorName
        FROM
@@ -132,7 +144,7 @@
                ) AS LVT ON LV.id = LVT.video_id
            </if>
        WHERE
            LV.delete_flag = 0
            LV.delete_flag = 0 AND LV.video_type = #{query.videoType}
            <if test="query.title != null and query.title != ''">AND LV.title LIKE CONCAT('%', #{query.title}, '%')</if>
            <if test="query.authorId != null and query.authorId != ''">AND LV.author_id = #{query.authorId}</if>
            <if test="query.status != null and query.status != ''">AND LV.status = #{query.status}</if>
@@ -147,7 +159,6 @@
            LV.video_duration,
            LV.video_file_key,
            LV.title,
            LV.goods_id,
            LV.goods_view_num,
            LV.goods_order_num,
            LV.recommend,
@@ -158,6 +169,9 @@
            LV.weight,
            LV.audit_pass_time,
            LV.update_time,
            LV.video_content_type,
            LV.video_type,
            LV.video_imgs,
            LV.id,
            LM.nick_name as authorName,
            LM.face as authorAvatar
@@ -165,7 +179,7 @@
            lmk_video LV
            LEFT JOIN li_member LM ON LV.author_id = LM.id
        WHERE
            LV.delete_flag = 0 AND LV.status = '1'
            LV.delete_flag = 0 AND LV.status = '1' AND LV.video_type = #{query.videoType}
    </select>
@@ -236,7 +250,6 @@
            LV.video_duration,
            LV.video_file_key,
            LV.title,
            LV.goods_id,
            LV.goods_view_num,
            LV.goods_order_num,
            LV.recommend,
@@ -247,6 +260,9 @@
            LV.weight,
            LV.audit_pass_time,
            LV.update_time,
            LV.video_content_type,
            LV.video_type,
            LV.video_imgs,
            LV.id,
            LM.nick_name as authorName,
            LM.face as authorAvatar
@@ -259,6 +275,7 @@
                AND LV.status = '1'
            </if>
            AND LV.author_id = #{query.authorId}
            AND LV.video_type = #{query.videoType}
        ORDER BY
            LV.collect_num DESC
    </select>
@@ -271,7 +288,6 @@
            LV.video_duration,
            LV.video_file_key,
            LV.title,
            LV.goods_id,
            LV.goods_view_num,
            LV.goods_order_num,
            LV.recommend,
@@ -282,6 +298,9 @@
            LV.weight,
            LV.audit_pass_time,
            LV.update_time,
            LV.video_content_type,
            LV.video_type,
            LV.video_imgs,
            LV.id,
            LM.nick_name as authorName,
            LM.face as authorAvatar
@@ -290,7 +309,7 @@
                INNER JOIN lmk_video LV ON LMC.ref_id = LV.id AND LV.delete_flag = 0 AND LV.status = '1'
                LEFT JOIN li_member LM ON LV.author_id = LM.id
        WHERE
            LMC.delete_flag = 0 AND LMC.user_id = #{query.authorId} AND LMC.collect_type = 'video'
            LMC.delete_flag = 0 AND LMC.user_id = #{query.authorId} AND LMC.collect_type = 'video' AND LV.video_type = #{query.videoType}
        ORDER BY
            LMC.create_time DESC
    </select>
@@ -315,7 +334,6 @@
            LV.video_duration,
            LV.video_file_key,
            LV.title,
            LV.goods_id,
            LV.goods_view_num,
            LV.goods_order_num,
            LV.recommend,
@@ -326,6 +344,9 @@
            LV.weight,
            LV.audit_pass_time,
            LV.update_time,
            LV.video_content_type,
            LV.video_type,
            LV.video_imgs,
            LV.id
        FROM
            lmk_video LV
manager-api/src/main/java/cn/lili/controller/lmk/VideoController.java
@@ -5,20 +5,16 @@
import cn.lili.modules.lmk.domain.form.VideoAuditingForm;
import cn.lili.modules.lmk.domain.form.VideoDownForm;
import cn.lili.modules.lmk.domain.form.VideoRecommendForm;
import cn.lili.modules.lmk.domain.form.WxVideoForm;
import cn.lili.modules.lmk.domain.query.ManagerVideoQuery;
import org.springframework.validation.annotation.Validated;
import org.springframework.security.access.prepost.PreAuthorize;
import lombok.RequiredArgsConstructor;
import java.util.List;
import org.springframework.validation.annotation.Validated;
import javax.validation.constraints.NotEmpty;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import cn.lili.modules.lmk.service.VideoService;
import cn.lili.base.Result;
import cn.lili.modules.lmk.domain.form.VideoForm;
import cn.lili.modules.lmk.domain.query.VideoQuery;
import lombok.RequiredArgsConstructor;
import org.springframework.web.bind.annotation.*;
/**
@@ -38,13 +34,13 @@
    @PostMapping
    @ApiOperation(value = "添加", notes = "添加")
    public Result add(@RequestBody @Validated(Add.class) VideoForm form) {
    public Result add(@RequestBody @Validated(Add.class) WxVideoForm form) {
        return videoService.add(form);
    }
    @PutMapping
    @ApiOperation(value = "修改", notes = "修改")
    public Result update(@RequestBody @Validated(Update.class) VideoForm form) {
    public Result update(@RequestBody @Validated(Update.class) WxVideoForm form) {
        return videoService.update(form);
    }