异常处理 异常查询标段优化

This commit is contained in:
dxc
2021-03-04 09:44:17 +08:00
parent 7fbe644c96
commit ae4f28cb6b

View File

@ -147,7 +147,7 @@
t.status as status t.status as status
from biz_project_section t from biz_project_section t
where t.project_id = ${projectId} where t.project_id = ${projectId}
and not exists (select * from biz_project_section_exception e where e.section_id = t.id) and not exists (select 1 from biz_project_section_exception e where e.section_id = t.id)
</select> </select>
<select id="selectEditSectionByUpdate" <select id="selectEditSectionByUpdate"
@ -160,7 +160,7 @@
from biz_project_section t from biz_project_section t
left join biz_project_section_exception e on e.section_id = t.id and e.exception_id = ${exceptionId} left join biz_project_section_exception e on e.section_id = t.id and e.exception_id = ${exceptionId}
where t.project_id = ${projectId} and t.status != '9' where t.project_id = ${projectId} and t.status != '9'
and not exists (select e.* from biz_project_section_exception e,biz_project_section s and not exists (select 1 from biz_project_section_exception e,biz_project_section s
where s.id = e.section_id and s.project_id = ${projectId} and e.exception_id != ${exceptionId} where s.id = e.section_id and s.project_id = ${projectId} and e.exception_id != ${exceptionId}
and e.section_id = t.id) and e.section_id = t.id)
</select> </select>