!295 新增EasyExcel枚举类数据翻译注解

* Merge remote-tracking branch 'origin/dev' into dev
* 利用ReflectUtil反射工具类获取Enum属性
* 利用ReflectUtil反射工具类获取Enum属性
* 新增EasyExcel枚举类数据翻译注解
This commit is contained in:
Liang
2023-03-06 03:59:59 +00:00
committed by MichelleChung
parent b465972e7c
commit d6c49b915f
2 changed files with 105 additions and 0 deletions

View File

@ -0,0 +1,30 @@
package com.ruoyi.common.annotation;
import java.lang.annotation.*;
/**
* 枚举格式化
*
* @author Liang
*/
@Target({ElementType.FIELD})
@Retention(RetentionPolicy.RUNTIME)
@Inherited
public @interface ExcelEnumFormat {
/**
* 字典枚举类型
*/
Class<? extends Enum<?>> enumClass();
/**
* 字典枚举类中对应的code属性名称默认为code
*/
String codeField() default "code";
/**
* 字典枚举类中对应的text属性名称默认为text
*/
String textField() default "text";
}