修改mapper文件路径

添加“MessageRecordMapper”
This commit is contained in:
longbinbin
2024-12-13 11:35:42 +08:00
parent 0145110b28
commit b544639b11
62 changed files with 94 additions and 89 deletions

@ -0,0 +1,55 @@
<?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.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>
<if test="isBuy!= null">is_buy = #{isBuy}, </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 v.id, v.scenic_id, member_id, template_id, task_id, worker_id, video_url, v.create_time, v.update_time,
s.name scenicName, s.latitude, s.longitude, t.name templateName, t.price templatePrice,t.cover_url templateCoverUrl,v.is_buy
from video v
left join scenic s on s.id = v.scenic_id
left join template t on v.template_id = t.id
<where>
<if test="scenicId!= null">and v.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="isBuy!=null">
and is_buy = #{isBuy}
</if>
<if test="startTime!= null">and v.create_time &gt;= #{startTime} </if>
<if test="endTime!= null">and v.create_time &lt;= #{endTime} </if>
</where>
</select>
<select id="getById" resultType="com.ycwl.basic.model.pc.video.resp.VideoRespVO">
select v.id, v.scenic_id, member_id, template_id, task_id, worker_id, video_url, v.create_time, v.update_time,
t.name templateName,t.price templatePrice,v.is_buy isBuy
from video v
left join template t on v.template_id = t.id
where v.id = #{id}
</select>
<select id="findByTaskId" resultType="com.ycwl.basic.model.pc.video.entity.VideoEntity">
select * from video where task_id = #{taskId} limit 1
</select>
</mapper>