bug修改,根性视频meta信息

This commit is contained in:
2025-01-09 19:34:20 +08:00
parent c27665e513
commit 5c0bf09c95
12 changed files with 101 additions and 7 deletions

View File

@ -2,8 +2,8 @@
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.ycwl.basic.mapper.VideoMapper">
<insert id="add">
insert into video(id, scenic_id, template_id, task_id, worker_id, video_url)
values (#{id}, #{scenicId}, #{templateId}, #{taskId}, #{workerId}, #{videoUrl})
insert into video(id, scenic_id, template_id, task_id, worker_id, video_url, height, width, duration)
values (#{id}, #{scenicId}, #{templateId}, #{taskId}, #{workerId}, #{videoUrl}, #{height}, #{width}, #{duration})
</insert>
<insert id="addRelation">
replace member_video(member_id, scenic_id, face_id, template_id, task_id, video_id, is_buy, order_id)
@ -24,9 +24,19 @@
<if test="taskId!= null">task_id = #{taskId}, </if>
<if test="workerId!= null">worker_id = #{workerId}, </if>
<if test="videoUrl!= null">video_url = #{videoUrl}, </if>
<if test="height!= null">height = #{height}, </if>
<if test="width!= null">width = #{width}, </if>
<if test="duration!= null">duration = #{duration}, </if>
</set>
where id = #{id}
</update>
<update id="updateMeta">
update video
set height = #{height},
width = #{width},
duration = #{duration}
where id = #{id}
</update>
<update id="updateRelation">
update member_video
<set>
@ -67,7 +77,7 @@
<select id="getById" resultType="com.ycwl.basic.model.pc.video.resp.VideoRespVO">
select v.id, v.scenic_id, template_id, task_id, worker_id, video_url, v.create_time, v.update_time,
t.name templateName,t.price templatePrice, t.cover_url templateCoverUrl, t.slash_price slashPrice,
s.name scenicName
s.name scenicName, v.height, v.width, v.duration
from video v
left join scenic s on v.scenic_id = s.id
left join template t on v.template_id = t.id