You've already forked FrameTour-BE
渲染机支持仅渲染几个景区的工作
This commit is contained in:
@@ -82,7 +82,15 @@
|
||||
<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 and scenic_id not in (select scenic_only from render_worker where scenic_only is not null and status = 1)
|
||||
where status = 0
|
||||
and worker_id is null
|
||||
and NOT EXISTS (
|
||||
SELECT 1
|
||||
FROM render_worker rw
|
||||
WHERE
|
||||
rw.status = 1
|
||||
AND FIND_IN_SET(task.scenic_id, rw.scenic_only) > 0 -- 检查scenic_id是否在逗号分隔的字符串中
|
||||
)
|
||||
limit 1
|
||||
</select>
|
||||
<select id="selectAllNotRunning" resultType="com.ycwl.basic.model.pc.task.entity.TaskEntity">
|
||||
@@ -133,9 +141,10 @@
|
||||
from task
|
||||
where status = 2
|
||||
</select>
|
||||
<select id="selectNotRunningByScenicId" resultType="com.ycwl.basic.model.pc.task.resp.TaskRespVO">
|
||||
<select id="selectNotRunningByScenicList" 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 and scenic_id = #{scenicId}
|
||||
where status = 0 and worker_id is null and FIND_IN_SET(scenic_id, #{scenicId})
|
||||
limit 1
|
||||
</select>
|
||||
</mapper>
|
||||
|
Reference in New Issue
Block a user