| | |
| | | package com.ard.common.annotation; |
| | | |
| | | import java.lang.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 |
| | | { |
| | | public @interface DataScopePlus { |
| | | /** |
| | | * 部门表的别名 |
| | | * 部门表的别名(需与 Wrapper 中设置的表别名一致) |
| | | */ |
| | | public String deptAlias() default ""; |
| | | String deptAlias() default ""; |
| | | |
| | | /** |
| | | * 用户表的别名 |
| | | * 用户表的别名(需与 Wrapper 中设置的表别名一致) |
| | | */ |
| | | public String userAlias() default ""; |
| | | String userAlias() default ""; |
| | | |
| | | /** |
| | | * 权限字符(用于多个角色匹配符合要求的权限)默认根据权限注解@ss获取,多个权限用逗号分隔开来 |
| | | * 权限字符(用于匹配角色对应的权限) |
| | | * 多个权限用逗号分隔,默认从 PermissionContextHolder 获取 |
| | | */ |
| | | public String permission() default ""; |
| | | String permission() default ""; |
| | | } |