广丰卷烟厂数采质量分析系统
zhuguifei
2026-03-02 80ff784bf60637cd348ae665fc907f7b1e527dd8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
package org.dromara.common.core.validate.dicts;
 
import jakarta.validation.Constraint;
import jakarta.validation.Payload;
 
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
 
/**
 * 字典项校验注解
 *
 * @author AprilWind
 */
@Constraint(validatedBy = DictPatternValidator.class)
@Target({ElementType.FIELD, ElementType.PARAMETER})
@Retention(RetentionPolicy.RUNTIME)
public @interface DictPattern {
 
    /**
     * 字典类型,如 "sys_user_sex"
     */
    String dictType();
 
    /**
     * 分隔符
     */
    String separator();
 
    /**
     * 默认校验失败提示信息
     */
    String message() default "字典值无效";
 
    Class<?>[] groups() default {};
 
    Class<? extends Payload>[] payload() default {};
 
}