com.didiglobal.logi.security.common.enums.ConfigStatusEnum Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of logi-security-spring-boot-starter Show documentation
Show all versions of logi-security-spring-boot-starter Show documentation
logi-security 提供项目大多都需要的一些基础功能(用户、角色、权限、登录、注册、操作记录)
package com.didiglobal.logi.security.common.enums;
public enum ConfigStatusEnum {
/**正常*/
NORMAL(1, "正常"),
DISABLE(2, "禁用");
ConfigStatusEnum(int code, String desc) {
this.code = code;
this.desc = desc;
}
private int code;
private String desc;
public int getCode() {
return code;
}
public String getDesc() {
return desc;
}
public static ConfigStatusEnum valueOf(Integer code) {
if (code == null) {
return null;
}
for (ConfigStatusEnum state : ConfigStatusEnum.values()) {
if (state.getCode() == code) {
return state;
}
}
return null;
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy