管道基础大数据平台系统开发-【后端】-Server
sws
2022-11-24 8fd5167233f96b20bc02aa4306b2bcb915d66da6
src/main/java/com/lf/server/helper/EnumHelper.java
@@ -34,7 +34,7 @@
     * @return 返回枚举值
     */
    public static <T extends Enum<T>> T getByString(Class<T> clazz, String propertyName, String value) {
        String getterMethodName = GETTER_PREFIX + StringHelper.capitalize(propertyName);
        String getterMethodName = GETTER_PREFIX + StringHelper.firstCharToUpperCase(propertyName);
        T result = null;
        try {
            T[] arr = clazz.getEnumConstants();
@@ -62,7 +62,7 @@
     * @return 返回枚举值
     */
    public static <T extends Enum<T>> T getByInt(Class<T> clazz, String propertyName, int value) {
        String getterMethodName = GETTER_PREFIX + StringHelper.capitalize(propertyName);
        String getterMethodName = GETTER_PREFIX + StringHelper.firstCharToUpperCase(propertyName);
        T result = null;
        try {
            T[] arr = clazz.getEnumConstants();