渲染端渲染流程

This commit is contained in:
2024-12-08 17:54:27 +08:00
parent 18b1776ac2
commit aa6da15c8f
21 changed files with 448 additions and 13 deletions

View File

@ -2,15 +2,21 @@
<!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.FaceSampleMapper">
<insert id="add">
insert into face_sample(id, device_id, face_url, match_sample_ids, first_match_rate, match_result,`status`)
values (#{id}, #{deviceId}, #{faceUrl}, #{matchSampleIds}, #{firstMatchRate}, #{matchResult},#{status})
insert into face_sample(id, scenic_id, device_id, source_id, face_url, match_sample_ids, first_match_rate, match_result,`status`)
values (#{id}, #{scenicId}, #{deviceId}, #{sourceId}, #{faceUrl}, #{matchSampleIds}, #{firstMatchRate}, #{matchResult},#{status})
</insert>
<update id="update">
update face_sample
<set>
<if test="scenicId!= null ">
scenic_id = #{scenicId},
</if>
<if test="deviceId!= null ">
device_id = #{deviceId},
</if>
<if test="sourceId!= null ">
source_id = #{sourceId},
</if>
<if test="faceUrl!= null and faceUrl!= ''">
face_url = #{faceUrl},
</if>
@ -42,15 +48,18 @@
</if>
</delete>
<select id="list" resultType="com.ycwl.basic.model.pc.faceSample.resp.FaceSampleRespVO">
select id, scenic_id, device_id, face_url, match_sample_ids, first_match_rate, match_result,`status`
select id, scenic_id, device_id, face_url, source_id, match_sample_ids, first_match_rate, match_result,`status`
from face_sample
<where>
<if test="scenicId!= null and scenicId!= ''">
and device_id = #{deviceId}
and scenic_id = #{scenicId}
</if>
<if test="deviceId!= null and deviceId!= ''">
and device_id = #{deviceId}
</if>
<if test="source_id!= null and source_id!= ''">
and source_id = #{source_id}
</if>
<if test="matchSampleIds!= null and matchSampleIds!= ''">
and match_sample_ids like concat('%', #{matchSampleIds}, '%')
</if>
@ -72,7 +81,7 @@
</where>
</select>
<select id="getById" resultType="com.ycwl.basic.model.pc.faceSample.resp.FaceSampleRespVO">
select id, scenic_id, device_id, face_url, match_sample_ids, first_match_rate, match_result,`status`
select id, scenic_id, device_id, face_url, match_sample_ids, first_match_rate, source_id, match_result,`status`
from face_sample
where id = #{id}
</select>

View File

@ -3,13 +3,13 @@
<mapper namespace="com.ycwl.basic.mapper.pc.MemberMapper">
<insert id="add">
insert into member(id, openid, nickname, real_name, promo_code, broker_id, agreement, phone, country, province, city)
values (#{id}, #{openid}, #{nickname}, #{realName}, #{promoCode}, #{brokerId}, #{agreement}, #{phone}, #{country}, #{province}, #{city})
values (#{id}, #{openId}, #{nickname}, #{realName}, #{promoCode}, #{brokerId}, #{agreement}, #{phone}, #{country}, #{province}, #{city})
</insert>
<update id="update">
update member
<set>
<if test="openid!= null and openid!= ''">
openid = #{openid},
<if test="openId!= null and openId!= ''">
openid = #{openId},
</if>
<if test="nickname!= null and nickname!= ''">
nickname = #{nickname},
@ -45,11 +45,13 @@
delete from member where id = #{id}
</delete>
<select id="list" resultType="com.ycwl.basic.model.pc.member.resp.MemberRespVO">
select id, openid, nickname, real_name, promo_code, broker_id, agreement, phone, country, province, city
select id, openid, nickname, real_name, promo_code, broker_id, agreement, phone, country, province, city,
(select count(1) from `order` where `order`.member_id = member.id) as order_count,
create_date
from member
<where>
<if test="openid!= null and openid!= ''">
and openid like concat('%',#{openid},'%')
<if test="openId!= null and openId!= ''">
and openid like concat('%',#{openId},'%')
</if>
<if test="nickname!= null and nickname!= ''">
and nickname like concat('%',#{nickname},'%')

View File

@ -121,4 +121,9 @@
from render_worker
where id = #{id}
</select>
<select id="findByAccessKey" resultType="com.ycwl.basic.model.pc.renderWorker.entity.RenderWorkerEntity">
select id, `name`, scenic_only, test_only, `online`, `status`, create_at, update_at
from render_worker
where access_key = #{accessKey} and status = 1
</select>
</mapper>

View File

@ -24,6 +24,16 @@
set status = #{status}
where id = #{id}
</update>
<update id="assignToWorker">
update task
set worker_id = #{workerId}
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>
@ -55,4 +65,9 @@ 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>
</mapper>

View File

@ -45,7 +45,7 @@
delete from template where scenic_id = #{id}
</delete>
<select id="list" resultType="com.ycwl.basic.model.pc.template.resp.TemplateRespVO">
select t.id, t.scenic_id, s.name as scenic_name, t.`name`, pid, is_placeholder, source_url, luts, overlays, audios, frame_rate, speed, cover_url, t.status, t.create_time, t.update_time
select t.id, t.scenic_id, s.name as scenic_name, t.`name`, cover_url, t.status, t.create_time, t.update_time
from template t left join scenic s on s.id = t.scenic_id
<where>
pid = 0