feat:(hotfix/20240611) 解决未在批量or外面加括号,导致不走索引,查询到多余的数据

This commit is contained in:
lilong 2024-06-11 15:39:55 +08:00
parent 551a2de23e
commit 666e1bcaf2

View File

@ -151,7 +151,7 @@
</if> </if>
<if test="req.workspaceOuPairs != null and req.workspaceOuPairs.size()>0"> <if test="req.workspaceOuPairs != null and req.workspaceOuPairs.size()>0">
AND AND (
<foreach collection="req.workspaceOuPairs" index="index" item="ouIdAndWorkspaceId" open="(" close=")" <foreach collection="req.workspaceOuPairs" index="index" item="ouIdAndWorkspaceId" open="(" close=")"
separator=") or ( "> separator=") or ( ">
1=1 1=1
@ -173,6 +173,7 @@
and t5.resource_type = #{ouIdAndWorkspaceId.resourceType} and t5.resource_type = #{ouIdAndWorkspaceId.resourceType}
</if> </if>
</foreach> </foreach>
)
</if> </if>