ExcelDictFormat.java 640 B

1234567891011121314151617181920212223242526272829303132
  1. package com.ruoyi.common.annotation;
  2. import com.ruoyi.common.utils.StringUtils;
  3. import java.lang.annotation.*;
  4. /**
  5. * 字典格式化
  6. *
  7. * @author Lion Li
  8. */
  9. @Target({ElementType.FIELD})
  10. @Retention(RetentionPolicy.RUNTIME)
  11. @Inherited
  12. public @interface ExcelDictFormat {
  13. /**
  14. * 如果是字典类型,请设置字典的type值 (如: sys_user_sex)
  15. */
  16. String dictType() default "";
  17. /**
  18. * 读取内容转表达式 (如: 0=男,1=女,2=未知)
  19. */
  20. String readConverterExp() default "";
  21. /**
  22. * 分隔符,读取字符串组内容
  23. */
  24. String separator() default StringUtils.SEPARATOR;
  25. }