init
This commit is contained in:
@@ -25,4 +25,20 @@ public enum YxImTypeEnum {
|
||||
this.code = code;
|
||||
this.text = text;
|
||||
}
|
||||
|
||||
public boolean isFileType(){
|
||||
if(this.getCode().equals(1) || this.getCode().equals(2) || this.getCode().equals(3)){
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
public static YxImTypeEnum getByCode(Integer code) {
|
||||
for (YxImTypeEnum value : values()) {
|
||||
if (value.code.equals(code)) {
|
||||
return value;
|
||||
}
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user