Digital Office Automation System Backend
Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

1 день назад
12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970
  1. <?xml version="1.0" encoding="UTF-8" ?>
  2. <!DOCTYPE mapper
  3. PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
  4. "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
  5. <mapper namespace="com.ruoyi.system.mapper.SysRoleMapper">
  6. <resultMap type="SysRole" id="SysRoleResult">
  7. <id property="roleId" column="role_id"/>
  8. <result property="roleName" column="role_name"/>
  9. <result property="roleKey" column="role_key"/>
  10. <result property="roleSort" column="role_sort"/>
  11. <result property="dataScope" column="data_scope"/>
  12. <result property="menuCheckStrictly" column="menu_check_strictly"/>
  13. <result property="deptCheckStrictly" column="dept_check_strictly"/>
  14. <result property="status" column="status"/>
  15. <result property="delFlag" column="del_flag"/>
  16. <result property="createBy" column="create_by"/>
  17. <result property="createTime" column="create_time"/>
  18. <result property="updateBy" column="update_by"/>
  19. <result property="updateTime" column="update_time"/>
  20. <result property="remark" column="remark"/>
  21. </resultMap>
  22. <sql id="selectRoleVo">
  23. select distinct r.role_id,
  24. r.role_name,
  25. r.role_key,
  26. r.role_sort,
  27. r.data_scope,
  28. r.menu_check_strictly,
  29. r.dept_check_strictly,
  30. r.status,
  31. r.del_flag,
  32. r.create_time,
  33. r.remark
  34. from sys_role r
  35. left join sys_user_role sur on sur.role_id = r.role_id
  36. left join sys_user u on u.user_id = sur.user_id
  37. left join sys_dept d on u.dept_id = d.dept_id
  38. </sql>
  39. <select id="selectPageRoleList" resultMap="SysRoleResult">
  40. <include refid="selectRoleVo"/>
  41. ${ew.getCustomSqlSegment}
  42. </select>
  43. <select id="selectRoleList" resultMap="SysRoleResult">
  44. <include refid="selectRoleVo"/>
  45. ${ew.getCustomSqlSegment}
  46. </select>
  47. <select id="selectRolePermissionByUserId" parameterType="Long" resultMap="SysRoleResult">
  48. <include refid="selectRoleVo"/>
  49. WHERE r.del_flag = '0' and sur.user_id = #{userId}
  50. </select>
  51. <select id="selectRoleListByUserId" parameterType="Long" resultType="Long">
  52. select r.role_id
  53. from sys_role r
  54. left join sys_user_role sur on sur.role_id = r.role_id
  55. left join sys_user u on u.user_id = sur.user_id
  56. where u.user_id = #{userId}
  57. </select>
  58. <select id="selectRolesByUserName" parameterType="String" resultMap="SysRoleResult">
  59. <include refid="selectRoleVo"/>
  60. WHERE r.del_flag = '0' and u.user_name = #{userName}
  61. </select>
  62. </mapper>