部门数据权限

This commit is contained in:
sxu 2025-03-10 12:54:53 +08:00
parent e8c3bbc2bd
commit 1b54186938
2 changed files with 16 additions and 1 deletions

View File

@ -44,6 +44,9 @@ public class SysRole extends BaseEntity
/** 数据类型(1-组织类,2-区域类) */
private Integer dataType;
/** 数据类型(1-全数据类, 2-组织类,3-商户类) */
private Integer roleType;
/** 数据范围1所有数据权限2自定义数据权限3本部门数据权限4本部门及以下数据权限5仅本人数据权限 */
@Excel(name = "数据范围", readConverterExp = "1=所有数据权限,2=自定义数据权限,3=本部门数据权限,4=本部门及以下数据权限,5=仅本人数据权限")
private String dataScope;
@ -159,6 +162,14 @@ public class SysRole extends BaseEntity
this.dataType = dataType;
}
public Integer getRoleType() {
return roleType;
}
public void setRoleType(Integer roleType) {
this.roleType = roleType;
}
public String getDataScope()
{
return dataScope;

View File

@ -9,6 +9,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="roleName" column="role_name" />
<result property="roleKey" column="role_key" />
<result property="roleSort" column="role_sort" />
<result property="roleType" column="role_type" />
<result property="dataType" column="data_type" />
<result property="dataScope" column="data_scope" />
<result property="menuCheckStrictly" column="menu_check_strictly" />
@ -27,7 +28,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<sql id="selectRoleVo">
select distinct r.role_id, r.role_name, r.role_key, r.role_sort, r.data_type, r.data_scope, r.menu_check_strictly, r.dept_check_strictly,
r.company_id, r.status, r.del_flag, r.create_time, r.remark, r.is_built_in, r.area_id
r.company_id, r.status, r.del_flag, r.create_time, r.remark, r.is_built_in, r.area_id, role_type
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
@ -114,6 +115,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="roleName != null and roleName != ''">role_name,</if>
<if test="roleKey != null and roleKey != ''">role_key,</if>
<if test="roleSort != null">role_sort,</if>
<if test="roleType != null and roleType != ''">role_type,</if>
<if test="dataType != null and dataType != ''">data_type,</if>
<if test="dataScope != null and dataScope != ''">data_scope,</if>
<if test="menuCheckStrictly != null">menu_check_strictly,</if>
@ -130,6 +132,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="roleName != null and roleName != ''">#{roleName},</if>
<if test="roleKey != null and roleKey != ''">#{roleKey},</if>
<if test="roleSort != null">#{roleSort},</if>
<if test="roleType != null and roleType != ''">#{roleType},</if>
<if test="dataType != null and dataType != ''">#{dataType},</if>
<if test="dataScope != null and dataScope != ''">#{dataScope},</if>
<if test="menuCheckStrictly != null">#{menuCheckStrictly},</if>
@ -150,6 +153,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="roleName != null and roleName != ''">role_name = #{roleName},</if>
<if test="roleKey != null and roleKey != ''">role_key = #{roleKey},</if>
<if test="roleSort != null">role_sort = #{roleSort},</if>
<if test="roleType != null and roleType != ''">role_type = #{roleType},</if>
<if test="dataType != null and dataType != ''">data_type = #{dataType},</if>
<if test="dataScope != null and dataScope != ''">data_scope = #{dataScope},</if>
<if test="menuCheckStrictly != null">menu_check_strictly = #{menuCheckStrictly},</if>