文件模块已完成

This commit is contained in:
2025-05-06 20:17:59 +08:00
parent e1458e937b
commit ef88f4be1e
18 changed files with 120 additions and 44 deletions

View File

@ -0,0 +1,20 @@
package com.greenorange.promotion.annotation;
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;
// 自定义校验注解
@Constraint(validatedBy = UserEnumValidator.class)
@Target({ ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD })
@Retention(RetentionPolicy.RUNTIME)
public @interface FileEnumValue {
String message() default "文件业务类型错误"; // 错误信息
Class<?>[] groups() default {}; // 组别
Class<? extends Payload>[] payload() default {}; // 负载
Class<? extends Enum<?>> enumClass(); // 枚举类类型
}