修改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

View File

@@ -0,0 +1,86 @@
<?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.TaskMapper">
<insert id="add">
insert into task(id, worker_id, member_id, template_id, scenic_id, task_params, video_url, `status`, result)
values (#{id}, #{workerId}, #{memberId}, #{templateId}, #{scenicId}, #{taskParams}, #{videoUrl}, #{status}, #{result})
</insert>
<update id="update">
update task
<set>
<if test="workerId!= null">worker_id = #{workerId}, </if>
<if test="memberId!= null">member_id = #{memberId}, </if>
<if test="faceId!= null">face_id = #{faceId}, </if>
<if test="templateId!= null">template_id = #{templateId}, </if>
<if test="scenicId!= null">scenic_id = #{scenicId}, </if>
<if test="taskParams!= null">task_params = #{taskParams}, </if>
<if test="videoUrl!= null">video_url = #{videoUrl}, </if>
<if test="status!= null">status = #{status}, </if>
<if test="result!= null">result = #{result}, </if>
</set>
where id = #{id}
</update>
<update id="updateStatus">
update task
set status = #{status}
where id = #{id}
</update>
<update id="assignToWorker">
update task
set worker_id = #{workerId}, status = 2
where id = #{taskId}
</update>
<update id="deassign">
update task
set worker_id = null
where id = #{taskId}
</update>
<delete id="deleteById">
delete from task where id = #{id}
</delete>
<select id="list" resultType="com.ycwl.basic.model.pc.task.resp.TaskRespVO">
select id, worker_id, member_id, template_id, scenic_id, task_params, video_url, `status`, result, create_time, update_time
from task
<where>
<if test="workerId!= null">and worker_id = #{workerId} </if>
<if test="memberId!= null">and member_id = #{memberId} </if>
<if test="templateId!= null">and template_id = #{templateId} </if>
<if test="scenicId!= null">and scenic_id = #{scenicId} </if>
<if test="status!= null">and `status` = #{status} </if>
<if test="startTime!= null">and create_time &gt;= #{startTime} </if>
<if test="endTime!= null">and create_time &lt;= #{endTime} </if>
</where>
</select>
<select id="getById" resultType="com.ycwl.basic.model.pc.task.resp.TaskRespVO">
select id, worker_id, member_id, template_id, scenic_id, task_params, video_url, `status`, result, create_time, update_time
from task
where id = #{id}
</select>
<select id="countByMemberIdStau" resultType="java.lang.Integer">
select count(1) from task
where member_id = #{userId} and status IN (0,2)
</select>
<select id="countByMemberIdStauFinish" resultType="java.lang.Integer">
select count(1)
from task
where member_id = #{userId}
and status = 1
</select>
<select id="selectNotRunning" resultType="com.ycwl.basic.model.pc.task.resp.TaskRespVO">
select id, worker_id, member_id, template_id, scenic_id, task_params, video_url, `status`, result, create_time, update_time
from task
where status = 0 and worker_id is null
</select>
<select id="countTask" resultType="java.lang.Integer">
select count(1) from task
<where>
<if test="workerId!= null">and worker_id = #{workerId} </if>
<if test="memberId!= null">and member_id = #{memberId} </if>
<if test="templateId!= null">and template_id = #{templateId} </if>
<if test="scenicId!= null">and scenic_id = #{scenicId} </if>
<if test="status!= null">and `status` = #{status} </if>
<if test="startTime!= null">and create_time &gt;= #{startTime} </if>
<if test="endTime!= null">and create_time &lt;= #{endTime} </if>
</where>
</select>
</mapper>