feat: 新增mybatis-plus数据权限拦截器

This commit is contained in:
haoxr
2022-12-13 00:29:17 +08:00
parent 919fe181e2
commit 33327f48a9
5 changed files with 210 additions and 5 deletions

View File

@@ -0,0 +1,32 @@
package com.youlai.system.enums;
import com.youlai.system.common.base.IBaseEnum;
import lombok.Getter;
/**
* 数据权限枚举
*
* @author haoxr
* @date 2022/10/14
*/
public enum DataScopeEnum implements IBaseEnum<Integer> {
/**
* value 越小,数据权限范围越大
*/
ALL(0, "所有数据"),
DEPT_AND_SUB(1, "部门及子部门数据"),
DEPT(2, "本部门数据"),
SELF(3, "本人数据");
@Getter
private Integer value;
@Getter
private String label;
DataScopeEnum(Integer value, String label) {
this.value = value;
this.label = label;
}
}