RuoYi
2022-09-28 ed19109e80a10fd4def53bae13a59f8a917c8fa1
src/main/resources/mybatis/system/SysRoleMapper.xml
@@ -33,6 +33,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>
@@ -62,7 +65,7 @@
      <include refid="selectRoleVo"/>
   </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
@@ -82,12 +85,12 @@
   
   <select id="checkRoleNameUnique" parameterType="String" resultMap="SysRoleResult">
      <include refid="selectRoleVo"/>
       where r.role_name=#{roleName} limit 1
       where r.role_name=#{roleName} and r.del_flag = '0' limit 1
   </select>
   
   <select id="checkRoleKeyUnique" parameterType="String" resultMap="SysRoleResult">
      <include refid="selectRoleVo"/>
       where r.role_key=#{roleKey} limit 1
       where r.role_key=#{roleKey} and r.del_flag = '0' limit 1
   </select>
   
    <insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">