zss
2026-04-25 a1a7bb5093d30397078ce42ef025cd07378d1e1c
src/main/java/com/ruoyi/basic/enums/ApplicationTypeEnum.java
@@ -11,4 +11,19 @@
    private final String type;
    ApplicationTypeEnum(String type) { this.type = type; }
    public String getType() { return type; }
    /**
     * 根据 type 值获取对应的枚举实例
     * @param type 应用类型字符串
     * @return 对应的 ApplicationTypeEnum 枚举实例
     * @throws RuntimeException 如果 type 无效
     */
    public static ApplicationTypeEnum getByType(String type) {
        for (ApplicationTypeEnum enumValue : ApplicationTypeEnum.values()) {
            if (enumValue.getType().equals(type)) {
                return enumValue;
            }
        }
        throw new RuntimeException("无效的应用类型: " + type);
    }
}