refactor(core): SSO 支持方式变更
parent
f21c618f70
commit
385156cd18
@ -0,0 +1,86 @@
|
|||||||
|
package cn.estsh.i3plus.pojo.base.enumutil;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author Wynne.Lu
|
||||||
|
* @date 2021/3/22 下午5:16
|
||||||
|
* @desc
|
||||||
|
*/
|
||||||
|
public class ScreenEnumUtil {
|
||||||
|
|
||||||
|
public enum DATA_OBJECT_SOURCE {
|
||||||
|
TABLE(10, "TABLE", "数据库表"),
|
||||||
|
VIEW(20, "VIEW", "数据库视图");
|
||||||
|
|
||||||
|
private Integer value;
|
||||||
|
private String code;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
DATA_OBJECT_SOURCE(Integer value, String code, String description) {
|
||||||
|
this.value = value;
|
||||||
|
this.code = code;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public Integer getValue() {
|
||||||
|
return value;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String codeOfDescription(String code) {
|
||||||
|
String tmp = null;
|
||||||
|
for (int i = 0; i < values().length; i++) {
|
||||||
|
if (values()[i].code.equals(code)) {
|
||||||
|
tmp = values()[i].description;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
public enum DEFAULT_FIELD_IN_DB {
|
||||||
|
CREATE_DATE_TIME("createDatetime", "create_date_time", "创建时间"),
|
||||||
|
MODIFY_DATE_TIME("modifyDatetime", "modify_date_time", "修改时间"),
|
||||||
|
IS_VALID("isValid", "is_valid", "是否有效"),
|
||||||
|
IS_DELETED("isDeleted", "is_deleted", "是否弱删");
|
||||||
|
|
||||||
|
private String code;
|
||||||
|
private String codeDb;
|
||||||
|
private String description;
|
||||||
|
|
||||||
|
DEFAULT_FIELD_IN_DB(String code, String codeDb, String description) {
|
||||||
|
this.code = code;
|
||||||
|
this.codeDb = codeDb;
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getCodeDb() {
|
||||||
|
return codeDb;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String codeOfDescription(String code) {
|
||||||
|
String tmp = null;
|
||||||
|
for (int i = 0; i < values().length; i++) {
|
||||||
|
if (values()[i].code.equals(code)) {
|
||||||
|
tmp = values()[i].description;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return tmp;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
Loading…
Reference in New Issue