ycl-common/src/main/java/enumeration/ErrorType.java
@@ -69,4 +69,16 @@ .filter(errorType -> errorType.getCategory() == category) .collect(Collectors.toList()); } // 根据value获取desc public static String getDescriptionByValue(String value) { for (ErrorType errorType : ErrorType.values()) { if (errorType.getValue().equals(value)) { return errorType.getDesc(); } } // 如果没有找到匹配的value,返回null或者抛出一个异常 // 这里返回null return null; } }