DataScope.java 954 B

12345678910111213141516171819202122232425262728293031323334353637
  1. package net.lab1024.smartadmin.common.anno;
  2. import net.lab1024.smartadmin.module.system.datascope.constant.DataScopeTypeEnum;
  3. import net.lab1024.smartadmin.module.system.datascope.constant.DataScopeWhereInTypeEnum;
  4. import java.lang.annotation.ElementType;
  5. import java.lang.annotation.Retention;
  6. import java.lang.annotation.RetentionPolicy;
  7. import java.lang.annotation.Target;
  8. /**
  9. * [ 数据范围 ]
  10. *
  11. * @author yandanyang
  12. * @version 1.0
  13. * @company 1024lab.net
  14. * @copyright (c) 2019 1024lab.netInc. All rights reserved.
  15. * @date
  16. * @since JDK1.8
  17. */
  18. @Retention(RetentionPolicy.RUNTIME)
  19. @Target(ElementType.METHOD)
  20. public @interface DataScope {
  21. DataScopeTypeEnum dataScopeType() default DataScopeTypeEnum.DEFAULT;
  22. DataScopeWhereInTypeEnum whereInType() default DataScopeWhereInTypeEnum.EMPLOYEE;
  23. /**
  24. * 第几个where 条件 从0开始
  25. * @return
  26. */
  27. int whereIndex() default 0;
  28. String joinSql() default "";
  29. }