Commit e4097856 by 黄超华

获取枚举类

1 parent f59604b6
...@@ -21,6 +21,18 @@ public interface BizMessageTypeEnum { ...@@ -21,6 +21,18 @@ public interface BizMessageTypeEnum {
public String getDisplayName() { public String getDisplayName() {
return text; return text;
} }
public static MessageTypeEnum getByValue(Integer value){
if (value == null){
return null;
}
for (MessageTypeEnum enums : MessageTypeEnum.values()) {
if (enums.getValue().equals(value)) {
return enums;
}
}
return null;
}
} }
@Getter @Getter
...@@ -56,6 +68,18 @@ public interface BizMessageTypeEnum { ...@@ -56,6 +68,18 @@ public interface BizMessageTypeEnum {
public String getDisplayName() { public String getDisplayName() {
return text; return text;
} }
public static MessageSmallTypeEnum getByValue(Integer value){
if (value == null){
return null;
}
for (MessageSmallTypeEnum enums : MessageSmallTypeEnum.values()) {
if (enums.getValue().equals(value)) {
return enums;
}
}
return null;
}
} }
} }
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!