diff --git a/src/main/java/com/ycwl/basic/mapper/pc/VideoMapper.java b/src/main/java/com/ycwl/basic/mapper/pc/VideoMapper.java new file mode 100644 index 0000000..e6ab007 --- /dev/null +++ b/src/main/java/com/ycwl/basic/mapper/pc/VideoMapper.java @@ -0,0 +1,25 @@ +package com.ycwl.basic.mapper.pc; + +import com.ycwl.basic.model.pc.template.entity.TemplateEntity; +import com.ycwl.basic.model.pc.template.req.TemplateReqQuery; +import com.ycwl.basic.model.pc.template.resp.TemplateRespVO; +import com.ycwl.basic.model.pc.video.entity.VideoEntity; +import com.ycwl.basic.model.pc.video.req.VideoReqQuery; +import com.ycwl.basic.model.pc.video.resp.VideoRespVO; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * @Author:longbinbin + * @Date:2024/12/2 15:27 + * 成片 + */ +@Mapper +public interface VideoMapper { + List list(VideoReqQuery videoReqQuery); + VideoRespVO getById(Long id); + int add(VideoEntity task); + int deleteById(Long id); + int update(VideoEntity task); +} diff --git a/src/main/java/com/ycwl/basic/model/pc/template/req/TemplateReqQuery.java b/src/main/java/com/ycwl/basic/model/pc/template/req/TemplateReqQuery.java index c0a5a54..3aface4 100644 --- a/src/main/java/com/ycwl/basic/model/pc/template/req/TemplateReqQuery.java +++ b/src/main/java/com/ycwl/basic/model/pc/template/req/TemplateReqQuery.java @@ -19,8 +19,6 @@ import java.util.Date; @Data @ApiModel("模版查询请求类") public class TemplateReqQuery extends BaseQueryParameterReq { - @TableId - private Long id; /** * 模版名称 */ @@ -73,6 +71,6 @@ public class TemplateReqQuery extends BaseQueryParameterReq { */ @ApiModelProperty("是否启用,0不是,1是") private Integer status; - private Date createTime; - private Date updateTime; + private Date startTime; + private Date endTime; } diff --git a/src/main/java/com/ycwl/basic/model/pc/video/entity/VideoEntity.java b/src/main/java/com/ycwl/basic/model/pc/video/entity/VideoEntity.java new file mode 100644 index 0000000..496935b --- /dev/null +++ b/src/main/java/com/ycwl/basic/model/pc/video/entity/VideoEntity.java @@ -0,0 +1,45 @@ +package com.ycwl.basic.model.pc.video.entity; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.util.Date; + +/** + * @Author:longbinbin + * @Date:2024/12/2 15:28 + * 视频成片 + */ +@Data +@TableName("video") +public class VideoEntity { + @TableId + private Long id; + /** + * 景区id + */ + private Long scenicId; + /** + * 用户id + */ + private Long memberId; + /** + * 模版id + */ + private Long templateId; + /** + * 任务id + */ + private Long taskId; + /** + * 执行任务的机器ID,render_worker.id + */ + private Long workerId; + /** + * 视频链接 + */ + private String videoUrl; + private Date createTime; + private Date updateTime; +} diff --git a/src/main/java/com/ycwl/basic/model/pc/video/req/VideoReqQuery.java b/src/main/java/com/ycwl/basic/model/pc/video/req/VideoReqQuery.java new file mode 100644 index 0000000..f2ffc4a --- /dev/null +++ b/src/main/java/com/ycwl/basic/model/pc/video/req/VideoReqQuery.java @@ -0,0 +1,51 @@ +package com.ycwl.basic.model.pc.video.req; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @Author:longbinbin + * @Date:2024/12/2 15:28 + * 视频成片 + */ +@Data +@ApiModel("成片查询请求类") +public class VideoReqQuery { + /** + * 景区id + */ + @ApiModelProperty("景区id") + private Long scenicId; + /** + * 用户id + */ + @ApiModelProperty("用户id") + private Long memberId; + /** + * 模版id + */ + @ApiModelProperty("模版id") + private Long templateId; + /** + * 任务id + */ + @ApiModelProperty("任务id") + private Long taskId; + /** + * 执行任务的机器ID,render_worker.id + */ + @ApiModelProperty("执行任务的机器ID,render_worker.id") + private Long workerId; + /** + * 视频链接 + */ + @ApiModelProperty("视频链接") + private String videoUrl; + private Date startTime; + private Date endTime; +} diff --git a/src/main/java/com/ycwl/basic/model/pc/video/resp/VideoRespVO.java b/src/main/java/com/ycwl/basic/model/pc/video/resp/VideoRespVO.java new file mode 100644 index 0000000..c67f322 --- /dev/null +++ b/src/main/java/com/ycwl/basic/model/pc/video/resp/VideoRespVO.java @@ -0,0 +1,55 @@ +package com.ycwl.basic.model.pc.video.resp; + +import com.baomidou.mybatisplus.annotation.TableId; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.ycwl.basic.model.common.BaseQueryParameterReq; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.Date; + +/** + * @Author:longbinbin + * @Date:2024/12/2 15:28 + * 视频成片 + */ +@Data +@ApiModel("成片查询请求类") +public class VideoRespVO extends BaseQueryParameterReq { + private Long id; + /** + * 景区id + */ + @ApiModelProperty("景区id") + private Long scenicId; + /** + * 用户id + */ + @ApiModelProperty("用户id") + private Long memberId; + /** + * 模版id + */ + @ApiModelProperty("模版id") + private Long templateId; + /** + * 任务id + */ + @ApiModelProperty("任务id") + private Long taskId; + /** + * 执行任务的机器ID,render_worker.id + */ + @ApiModelProperty("执行任务的机器ID,render_worker.id") + private Long workerId; + /** + * 视频链接 + */ + @ApiModelProperty("视频链接") + private String videoUrl; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") + private Date updateTime; +} diff --git a/src/main/resources/mapper/pc/VideoMapper.xml b/src/main/resources/mapper/pc/VideoMapper.xml new file mode 100644 index 0000000..eab3dc4 --- /dev/null +++ b/src/main/resources/mapper/pc/VideoMapper.xml @@ -0,0 +1,43 @@ + + + + + insert into video(id, scenic_id, member_id, template_id, task_id, worker_id, video_url) + values (#{id}, #{scenicId}, #{memberId}, #{templateId}, #{taskId}, #{workerId}, #{videoUrl}) + + + update video + + scenic_id = #{scenicId}, + member_id = #{memberId}, + template_id = #{templateId}, + task_id = #{taskId}, + worker_id = #{workerId}, + video_url = #{videoUrl}, + + where id = #{id} + + + delete from video where id = #{id} + + + + \ No newline at end of file