web端已基本完成
This commit is contained in:
@ -0,0 +1,21 @@
|
||||
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 = WithdrawStatusEnumValidator.class)
|
||||
@Target({ ElementType.FIELD, ElementType.PARAMETER, ElementType.METHOD })
|
||||
@Retention(RetentionPolicy.RUNTIME)
|
||||
public @interface WithdrawStatusEnumValue {
|
||||
String message() default "提现状态错误"; // 错误信息
|
||||
Class<?>[] groups() default {}; // 组别
|
||||
Class<? extends Payload>[] payload() default {}; // 负载
|
||||
Class<? extends Enum<?>> enumClass(); // 枚举类类型
|
||||
}
|
Reference in New Issue
Block a user