Commit 9143938c authored by tianbo's avatar tianbo

perf(amos-boot-system-tzs): 优化用户信息查询中的岗位搜索逻辑

- 使用 JSONB 操作符替换原有的 LIKE 搜索,提高查询效率 - 通过 ARRAY 和 ??| 操作符实现对岗位列表的快速搜索 - 优化了 SQL 语句结构,提升了代码可读性和查询性能
parent 7e1934e3
......@@ -329,10 +329,11 @@
and ((e.supervise_org_code != '50' and e.supervise_org_code LIKE CONCAT (#{filter.orgCode}, '%')) or (e.supervise_org_code = '50' and e.office_region LIKE CONCAT ('%', #{filter.cityCode}, '%')))
</if>
<if test="postList != null and postList.size() > 0">
and
<foreach collection="postList" open="(" close=")" item="post" separator="or">
u.new_post like concat('%',#{post}, '%')
AND u.new_post::jsonb ??| ARRAY[
<foreach collection="postList" item="item" separator=",">
#{item}
</foreach>
]
</if>
<if test="filter.postCode != null and filter.postCode != ''">
and u.new_post like concat('%',#{filter.postCode}, '%')
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment