Commit 143ea43d by 杨林龙

增加增加特殊登陆枚举

1 parent d1366280
package cn.com.glsx.usercenter.api.enums;
import lombok.Getter;
@Getter
public enum SpecialLoginEnum {
NON_SPECIAL_LOGIN(0, "非特殊登陆"),
SPECIAL_LOGIN(1, "特殊登陆");
private final Integer code;
private final String name;
SpecialLoginEnum(Integer code, String name) {
this.code = code;
this.name = name;
}
public static String getNameByCode(Integer code) {
for (SpecialLoginEnum typeEnum : SpecialLoginEnum.values()) {
if (typeEnum.getCode().equals(code)) {
return typeEnum.getName();
}
}
return "--";
}
}
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!