秋辞未寒
2024-12-09 4821902fdc73052b56a0b39ebe60e0c7287b254e
ruoyi-common/ruoyi-common-core/src/main/java/org/dromara/common/core/validate/enumd/EnumPatternValidator.java
@@ -28,10 +28,10 @@
        try {
            if (StringUtils.isNotBlank(value)) {
                Class<?> type = annotation.type();
                String fieldName = annotation.fieldName();
                Object[] enumConstants = type.getEnumConstants();
                Method method = ReflectUtils.getMethod(type, annotation.method());
                for (Object e : enumConstants) {
                    if (value.equals(method.invoke(e))) {
                    if (value.equals(ReflectUtils.invokeGetter(e, fieldName))) {
                        return true;
                    }
                }