疯狂的狮子li
2021-10-27 695cb6d76b838b1e4cb161bae335faa948dca12a
ruoyi-system/src/main/resources/mapper/system/SysRoleMapper.xml
@@ -42,6 +42,9 @@
    <select id="selectPageRoleList" parameterType="SysRole" resultMap="SysRoleResult">
        <include refid="selectRoleVo"/>
        where r.del_flag = '0'
        <if test="role.roleId != null and role.roleId != 0">
            AND r.role_id = #{role.roleId}
        </if>
        <if test="role.roleName != null and role.roleName != ''">
            AND r.role_name like concat('%', #{role.roleName}, '%')
        </if>
@@ -67,6 +70,9 @@
    <select id="selectRoleList" parameterType="SysRole" resultMap="SysRoleResult">
        <include refid="selectRoleVo"/>
        where r.del_flag = '0'
        <if test="roleId != null and roleId != 0">
            AND r.role_id = #{roleId}
        </if>
        <if test="roleName != null and roleName != ''">
            AND r.role_name like concat('%', #{roleName}, '%')
        </if>
@@ -94,7 +100,7 @@
        WHERE r.del_flag = '0' and ur.user_id = #{userId}
    </select>
    <select id="selectRoleListByUserId" parameterType="Long" resultType="Integer">
    <select id="selectRoleListByUserId" parameterType="Long" resultType="Long">
        select r.role_id
        from sys_role r
                 left join sys_user_role ur on ur.role_id = r.role_id