乱七八糟的修改,其他外围流程逻辑完善

This commit is contained in:
2024-12-15 17:31:39 +08:00
parent ba00a90412
commit c27d094965
25 changed files with 265 additions and 66 deletions

View File

@ -77,13 +77,13 @@
where id = #{id}
</select>
<select id="getByMemberId" resultType="com.ycwl.basic.model.pc.face.resp.FaceRespVO">
select id, member_id, face_url,score, match_sample_ids, first_match_rate, match_result, create_at, update_at
select id, scenic_id, member_id, face_url,score, match_sample_ids, first_match_rate, match_result, create_at, update_at
from face
where member_id = #{memberId}
where member_id = #{userId} and scenic_id = #{scenicId}
</select>
<select id="listByScenicIdAndNotFinished" resultType="com.ycwl.basic.model.pc.face.resp.FaceRespVO">
select id, scenic_id, member_id, face_url,score, match_sample_ids, first_match_rate, match_result, create_at, update_at
from face
where scenic_id = #{scenicId} and finished_journey != 1
</select>
</mapper>
</mapper>

View File

@ -90,7 +90,7 @@
where id = #{id}
</select>
<select id="listByIds" resultType="com.ycwl.basic.model.pc.faceSample.resp.FaceSampleRespVO">
select id, scenic_id, device_id, face_url, match_sample_ids, first_match_rate, source_id, match_result,`status`
select id, scenic_id, device_id, face_url, match_sample_ids, first_match_rate, source_id, match_result,`status`, create_at
from face_sample
where id in (
<foreach collection="list" item="id" separator=",">
@ -98,4 +98,4 @@
</foreach>
)
</select>
</mapper>
</mapper>

View File

@ -63,4 +63,21 @@
<select id="countByMemberId" resultType="java.lang.Integer">
select count(1) from source where member_id = #{userId}
</select>
</mapper>
<select id="listBySampleIds" resultType="com.ycwl.basic.model.pc.source.entity.SourceEntity">
select *
from source
where face_sample_id in
<foreach collection="list" item="item" open="(" separator="," close=")">
#{item}
</foreach>
</select>
<select id="listVideoBySampleIds" resultType="com.ycwl.basic.model.pc.source.entity.SourceEntity">
select *
from source
where face_sample_id in
<foreach collection="list" item="item" open="(" separator="," close=")">
#{item}
</foreach>
and type = 1
</select>
</mapper>

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.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 into task(id, worker_id, member_id, face_id, template_id, scenic_id, task_params, video_url, `status`, result, automatic)
values (#{id}, #{workerId}, #{memberId}, #{faceId}, #{templateId}, #{scenicId}, #{taskParams}, #{videoUrl}, #{status}, #{result}, #{automatic})
</insert>
<update id="update">
update task
@ -35,11 +35,26 @@
set worker_id = null
where id = #{taskId}
</update>
<update id="setStart">
update task
set start_time = now(), worker_id = #{workerId}
where id = #{id}
</update>
<update id="setSuccess">
update task
set end_time = now(), status = 1, result = #{result}
where id = #{id}
</update>
<update id="setFail">
update task
set end_time = now(), status = 3, result = #{result}
where id = #{id}
</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
select id, worker_id, member_id, template_id, scenic_id, task_params, video_url, `status`, result, create_time, update_time, start_time, end_time
from task
<where>
<if test="workerId!= null">and worker_id = #{workerId} </if>
@ -83,4 +98,4 @@ from task
<if test="endTime!= null">and create_time &lt;= #{endTime} </if>
</where>
</select>
</mapper>
</mapper>

View File

@ -91,4 +91,9 @@
<select id="getConfig" resultType="com.ycwl.basic.model.pc.template.entity.TemplateConfigEntity">
select * from template_config where template_id = #{templateId}
</select>
</mapper>
<select id="listByScenicId" resultType="com.ycwl.basic.model.pc.template.entity.TemplateEntity">
select *
from template
where scenic_id = #{scenicId} and pid = 0
</select>
</mapper>