mirror of
https://github.com/dromara/RuoYi-Vue-Plus.git
synced 2025-09-26 05:06:40 +08:00
add 新增 modules 模块, 包含 demo, generator, job, system 模块 ; update 更新模块包名 rateLimiter => ratelimiter ; refactor 重构 ratelimiter 模块, 参考幂等模块加入自动装配相关配置 ; fix 修正 AsyncConfig 实现接口 ; fix 修正 SwaggerConfig 注解写法 ; fix 修正 ruoyi-common-doc pom 描述 ; delete LogAspect 去掉无用注解 ;
57 lines
2.0 KiB
XML
57 lines
2.0 KiB
XML
<?xml version="1.0" encoding="UTF-8" ?>
|
|
<!DOCTYPE mapper
|
|
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<mapper namespace="com.ruoyi.system.mapper.SysRoleMapper">
|
|
|
|
<resultMap type="com.ruoyi.system.domain.SysRole" id="SysRoleResult">
|
|
</resultMap>
|
|
|
|
<sql id="selectRoleVo">
|
|
select distinct r.role_id,
|
|
r.role_name,
|
|
r.role_key,
|
|
r.role_sort,
|
|
r.data_scope,
|
|
r.menu_check_strictly,
|
|
r.dept_check_strictly,
|
|
r.status,
|
|
r.del_flag,
|
|
r.create_time,
|
|
r.remark
|
|
from sys_role r
|
|
left join sys_user_role sur on sur.role_id = r.role_id
|
|
left join sys_user u on u.user_id = sur.user_id
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
</sql>
|
|
|
|
<select id="selectPageRoleList" resultMap="SysRoleResult">
|
|
<include refid="selectRoleVo"/>
|
|
${ew.getCustomSqlSegment}
|
|
</select>
|
|
|
|
<select id="selectRoleList" resultMap="SysRoleResult">
|
|
<include refid="selectRoleVo"/>
|
|
${ew.getCustomSqlSegment}
|
|
</select>
|
|
|
|
<select id="selectRolePermissionByUserId" parameterType="Long" resultMap="SysRoleResult">
|
|
<include refid="selectRoleVo"/>
|
|
WHERE r.del_flag = '0' and sur.user_id = #{userId}
|
|
</select>
|
|
|
|
<select id="selectRoleListByUserId" parameterType="Long" resultType="Long">
|
|
select r.role_id
|
|
from sys_role r
|
|
left join sys_user_role sur on sur.role_id = r.role_id
|
|
left join sys_user u on u.user_id = sur.user_id
|
|
where u.user_id = #{userId}
|
|
</select>
|
|
|
|
<select id="selectRolesByUserName" parameterType="String" resultMap="SysRoleResult">
|
|
<include refid="selectRoleVo"/>
|
|
WHERE r.del_flag = '0' and u.user_name = #{userName}
|
|
</select>
|
|
|
|
</mapper>
|