package com.ard.common.annotation;
|
|
import java.lang.annotation.Documented;
|
import java.lang.annotation.ElementType;
|
import java.lang.annotation.Retention;
|
import java.lang.annotation.RetentionPolicy;
|
import java.lang.annotation.Target;
|
|
/**
|
* MyBatis-Plus 专用数据权限过滤注解
|
* 用于标注需要进行数据权限过滤的方法,配合 QueryWrapper 使用
|
*
|
* @author ard
|
*/
|
@Target(ElementType.METHOD)
|
@Retention(RetentionPolicy.RUNTIME)
|
@Documented
|
public @interface DataScopePlus {
|
/**
|
* 部门表的别名(需与 Wrapper 中设置的表别名一致)
|
*/
|
String deptAlias() default "";
|
|
/**
|
* 用户表的别名(需与 Wrapper 中设置的表别名一致)
|
*/
|
String userAlias() default "";
|
|
/**
|
* 权限字符(用于匹配角色对应的权限)
|
* 多个权限用逗号分隔,默认从 PermissionContextHolder 获取
|
*/
|
String permission() default "";
|
}
|