zhongrj
2024-04-22 54f39c62a9564c56d324302d88bc27b44d0ac146
角色名称查询优化
1 files modified
18 ■■■■■ changed files
src/main/java/org/springblade/modules/system/mapper/RoleMapper.xml 18 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/RoleMapper.xml
@@ -53,12 +53,18 @@
        role_alias
        FROM
        blade_role
        WHERE
        id IN
        <foreach collection="array" item="ids" index="index" open="(" close=")" separator=",">
            #{ids}
        </foreach>
        and is_deleted = 0
        WHERE is_deleted = 0
        <choose>
            <when test="array!=null and array.length>0">
                and id IN
                <foreach collection="array" item="ids" index="index" open="(" close=")" separator=",">
                    #{ids}
                </foreach>
            </when>
            <otherwise>
                and id IN ('')
            </otherwise>
        </choose>
    </select>
    <select id="getRoleListByIds" resultType="org.springblade.modules.system.entity.Role">
        SELECT * FROM BLADE_ROLE