处理bug

This commit is contained in:
zk
2026-07-31 16:14:39 +08:00
parent a6a1081f74
commit 93ecc2364e
@@ -168,28 +168,28 @@
INNER JOIN bg_company c ON ra.company_id = c.id
WHERE c.status = 1
AND ra.status = 1
AND (
1 = 0
<if test="industryNames != null and industryNames.size() > 0">
OR ra.id IN (
AND ra.clean_status = 1
<!-- 命中任一维度:UNION合并两个维度的公告id,外层保持单个可半连接的IN -->
AND ra.id IN (
<trim prefixOverrides="UNION">
<if test="industryNames != null and industryNames.size() > 0">
SELECT rai.announcement_id
FROM bg_recruit_announcement_industry rai
WHERE rai.industry_name IN
<foreach collection="industryNames" item="name" open="(" separator="," close=")">
#{name}
</foreach>
)
</if>
<if test="categoryNames != null and categoryNames.size() > 0">
OR ra.id IN (
</if>
<if test="categoryNames != null and categoryNames.size() > 0">
UNION
SELECT rac.announcement_id
FROM bg_recruit_announcement_category rac
WHERE rac.category_name IN
<foreach collection="categoryNames" item="name" open="(" separator="," close=")">
#{name}
</foreach>
)
</if>
</if>
</trim>
)
ORDER BY ra.id DESC
</select>