You've already forked FrameTour-BE
添加“video”相关CRUD代码
This commit is contained in:
43
src/main/resources/mapper/pc/VideoMapper.xml
Normal file
43
src/main/resources/mapper/pc/VideoMapper.xml
Normal file
@ -0,0 +1,43 @@
|
||||
<?xml version="1.0" encoding="UTF-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.pc.VideoMapper">
|
||||
<insert id="add">
|
||||
insert into video(id, scenic_id, member_id, template_id, task_id, worker_id, video_url)
|
||||
values (#{id}, #{scenicId}, #{memberId}, #{templateId}, #{taskId}, #{workerId}, #{videoUrl})
|
||||
</insert>
|
||||
<update id="update">
|
||||
update video
|
||||
<set>
|
||||
<if test="scenicId!= null">scenic_id = #{scenicId}, </if>
|
||||
<if test="memberId!= null">member_id = #{memberId}, </if>
|
||||
<if test="templateId!= null">template_id = #{templateId}, </if>
|
||||
<if test="taskId!= null">task_id = #{taskId}, </if>
|
||||
<if test="workerId!= null">worker_id = #{workerId}, </if>
|
||||
<if test="videoUrl!= null">video_url = #{videoUrl}, </if>
|
||||
</set>
|
||||
where id = #{id}
|
||||
</update>
|
||||
<delete id="deleteById">
|
||||
delete from video where id = #{id}
|
||||
</delete>
|
||||
<select id="list" resultType="com.ycwl.basic.model.pc.video.resp.VideoRespVO">
|
||||
select id, scenic_id, member_id, template_id, task_id, worker_id, video_url, create_time, update_time
|
||||
from video
|
||||
<where>
|
||||
<if test="scenicId!= null">and scenic_id = #{scenicId} </if>
|
||||
<if test="memberId!= null">and member_id = #{memberId} </if>
|
||||
<if test="templateId!= null">and template_id = #{templateId} </if>
|
||||
<if test="taskId!=null">
|
||||
and task_id = #{taskId}
|
||||
</if>
|
||||
<if test="workerId!= null">and worker_id = #{workerId} </if>
|
||||
<if test="startTime!= null">and create_time >= #{startTime} </if>
|
||||
<if test="endTime!= null">and create_time <= #{endTime} </if>
|
||||
</where>
|
||||
</select>
|
||||
<select id="getById" resultType="com.ycwl.basic.model.pc.video.resp.VideoRespVO">
|
||||
select id, scenic_id, member_id, template_id, task_id, worker_id, video_url, create_time, update_time
|
||||
from video
|
||||
where id = #{id}
|
||||
</select>
|
||||
</mapper>
|
Reference in New Issue
Block a user