You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The following query defined in DeptMapper.xml is not optimal:
<selectid="list"resultType="map">
select
...
from sys_dept where 1 = 1
...
<iftest="deptId != null and deptId != ''">
and (dept_id = #{deptId} or dept_id in ( select dept_id from sys_dept where pids like CONCAT('%$[', #{deptId}, '$]%') escape '$' ))
</if>
order by sort ASC
</select>
The sub-query could be eliminated and changes to a predicate on pids.
and (dept_id = #{deptId} or pids like CONCAT('%$[', #{deptId}, '$]%') escape '$')
The text was updated successfully, but these errors were encountered:
wtune
added a commit
to wtune/Guns
that referenced
this issue
Jan 10, 2020
The following query defined in DeptMapper.xml is not optimal:
The sub-query could be eliminated and changes to a predicate on
pids
.The text was updated successfully, but these errors were encountered: