feat(projects): 服务机构筛选改 IN 精确查询
- BizProject: 加 List<Long> execAdminUserIds (多选 select IN 透传), execOrgName 标 @Deprecated (兼容老 API) - BizProjectMapper: selectList 替换 3 列 OR LIKE (org_name/user_name/nick_name) → EXISTS + bpa.exec_user_id IN (精确, 跟 sponsorAdminUserIds 对称) - BizOrgMapper: selectExecutorOrgOptions 加 LIMIT 5 (跟 sponsor 对齐)
This commit is contained in:
@@ -170,16 +170,14 @@
|
||||
#{id}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="execOrgName != null and execOrgName != ''">
|
||||
<if test="execAdminUserIds != null and execAdminUserIds.size() > 0">
|
||||
and exists (
|
||||
select 1 from biz_project_assign bpa
|
||||
join biz_org o2 on o2.org_id = bpa.execution_unit_id and o2.org_type = 'executor'
|
||||
join sys_user su on su.user_id = bpa.exec_user_id
|
||||
where bpa.project_id = project_id
|
||||
and su.role_type = 'executor'
|
||||
and (o2.org_name like concat('%', #{execOrgName}, '%')
|
||||
or su.user_name like concat('%', #{execOrgName}, '%')
|
||||
or su.nick_name like concat('%', #{execOrgName}, '%'))
|
||||
and bpa.exec_user_id in
|
||||
<foreach collection="execAdminUserIds" item="id" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
<if test="isFinished != null and isFinished != ''">and is_finished = #{isFinished}</if>
|
||||
|
||||
Reference in New Issue
Block a user