DataScope.java 769 B

123456789101112131415161718192021222324252627282930313233
  1. package com.ylx.common.annotation;
  2. import java.lang.annotation.Documented;
  3. import java.lang.annotation.ElementType;
  4. import java.lang.annotation.Retention;
  5. import java.lang.annotation.RetentionPolicy;
  6. import java.lang.annotation.Target;
  7. /**
  8. * 数据权限过滤注解
  9. *
  10. * @author ylx
  11. */
  12. @Target(ElementType.METHOD)
  13. @Retention(RetentionPolicy.RUNTIME)
  14. @Documented
  15. public @interface DataScope
  16. {
  17. /**
  18. * 部门表的别名
  19. */
  20. public String deptAlias() default "";
  21. /**
  22. * 用户表的别名
  23. */
  24. public String userAlias() default "";
  25. /**
  26. * 权限字符(用于多个角色匹配符合要求的权限)默认根据权限注解@ss获取,多个权限用逗号分隔开来
  27. */
  28. public String permission() default "";
  29. }