xiangpei
2024-07-22 bb7c0d979cc614e1e28f2a56cf75fc4b905edb97
ycl-server/src/main/resources/mapper/system/SysRoleMapper.xml
@@ -32,7 +32,7 @@
    
    <select id="selectRoleList" parameterType="com.ycl.system.entity.SysRole" resultMap="SysRoleResult">
      <include refid="selectRoleVo"/>
      where r.del_flag = '0'
      where r.del_flag = 0
      <if test="roleId != null and roleId != 0">
         AND r.role_id = #{roleId}
      </if>
@@ -58,7 +58,7 @@
    
   <select id="selectRolePermissionByUserId" parameterType="Long" resultMap="SysRoleResult">
      <include refid="selectRoleVo"/>
      WHERE r.del_flag = '0' and ur.user_id = #{userId}
      WHERE r.del_flag = 0 and ur.user_id = #{userId}
   </select>
   
   <select id="selectRoleAll" resultMap="SysRoleResult">
@@ -80,21 +80,21 @@
   
   <select id="selectRolesByUserName" parameterType="String" resultMap="SysRoleResult">
      <include refid="selectRoleVo"/>
      WHERE r.del_flag = '0' and u.user_name = #{userName}
      WHERE r.del_flag = 0 and u.user_name = #{userName}
   </select>
   
   <select id="checkRoleNameUnique" parameterType="String" resultMap="SysRoleResult">
      <include refid="selectRoleVo"/>
       where r.role_name=#{roleName} and r.del_flag = '0' 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} and r.del_flag = '0' limit 1
       where r.role_key=#{roleKey} and r.del_flag = 0 limit 1
   </select>
    <select id="selectRoleByKey" resultType="com.ycl.system.entity.SysRole">
      select * from sys_role where role_key = #{roleKey} and del_flag = '0' limit 1
      select * from sys_role where role_key = #{roleKey} and del_flag = 0 limit 1
   </select>
    <insert id="insertRole" parameterType="com.ycl.system.entity.SysRole" useGeneratedKeys="true" keyProperty="roleId">