init
This commit is contained in:
@@ -9,6 +9,7 @@ public enum SystemPushTypeEnum {
|
||||
TEXT(1,"文本消息"),
|
||||
SIMPLE_IMAGE_TEXT(2,"单图文消息"),
|
||||
IMAGE_TEXT(3,"多图文消息"),
|
||||
ONLY_IMAGE(4,"纯图文消息"),
|
||||
;
|
||||
private final Integer code;
|
||||
private final String text;
|
||||
@@ -17,4 +18,14 @@ public enum SystemPushTypeEnum {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public static SystemPushTypeEnum getByCode(Integer type) {
|
||||
SystemPushTypeEnum[] values = SystemPushTypeEnum.values();
|
||||
for (SystemPushTypeEnum value : values) {
|
||||
if(value.getCode().equals(type)){
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user