疯狂的狮子Li
2024-12-10 b1badca062e9f3d22398299247cca8ff191414da
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;
                    }
                }