This commit is contained in:
18792927508
2024-01-05 15:34:00 +08:00
parent 464eb8b824
commit 37a72958f1
10 changed files with 414 additions and 136 deletions
@@ -0,0 +1,25 @@
package com.ruoyi.common.annotation;
import java.lang.annotation.*;
/**
* 查询时字典转换注解 支持的返回类型:PageRes,List,VO类
* @Author wangqiong
* @Date 2023/01/5
* @Version V1.0
*/
// 标注这个类它可以标注的位置
@Target({ElementType.FIELD, ElementType.ANNOTATION_TYPE})
// 标注这个注解的注解保留时期
@Retention(RetentionPolicy.RUNTIME)
// 是否生成注解文档
@Documented
public @interface DictConvert {
//转换字典的目标字段,不填时默认为注解的字段本身
String targetField() default "";
//是否多选
boolean isMultiple() default false;
//分隔符 默认为逗号
String separator() default ",";
// 字典类型
String dictType() default "";
}