|
|
|
@ -84,13 +84,23 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="checkRoleNameUnique" parameterType="String" resultMap="SysRoleResult">
|
|
|
|
|
<include refid="selectRoleVo"/>
|
|
|
|
|
where r.role_name=#{roleName} and r.del_flag = '0' limit 1
|
|
|
|
|
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 ur on ur.role_id = r.role_id
|
|
|
|
|
left join sys_user u on u.user_id = ur.user_id
|
|
|
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
|
|
where r.role_name=#{roleName} and r.del_flag = '0'
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="checkRoleKeyUnique" parameterType="String" resultMap="SysRoleResult">
|
|
|
|
|
<include refid="selectRoleVo"/>
|
|
|
|
|
where r.role_key=#{roleKey} and r.del_flag = '0' limit 1
|
|
|
|
|
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 ur on ur.role_id = r.role_id
|
|
|
|
|
left join sys_user u on u.user_id = ur.user_id
|
|
|
|
|
left join sys_dept d on u.dept_id = d.dept_id
|
|
|
|
|
where r.role_key=#{roleKey} and r.del_flag = '0'
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<insert id="insertRole" parameterType="SysRole" useGeneratedKeys="true" keyProperty="roleId">
|
|
|
|
|