1.add enum for app update

main
Gary 1 year ago
parent c4d802580e
commit 001e1a3481

@ -0,0 +1,30 @@
package enums;
public enum AppUpdateSatusEnum {
INIT(0, "未发布"), GRAYSCALE(1, "灰度发布"), ALL(2, "全网发布");
private Integer status;
private String description;
AppUpdateSatusEnum(int status, String description) {
this.status = status;
this.description = description;
}
public Integer getStatus() {
return status;
}
public String getDescription() {
return description;
}
public static AppUpdateSatusEnum getByStatus(Integer status) {
for (AppUpdateSatusEnum at : AppUpdateSatusEnum.values()) {
if (at.status.equals(status)) {
return at;
}
}
return null;
}
}

@ -0,0 +1,36 @@
package enums;
public enum AppUpdateTypeEnum {
ALL(0, ".apk", "全更新"), WGT(1, ".wgt", "局部热更新");
private Integer type;
private String suffix;
private String description;
AppUpdateTypeEnum(int type, String suffix, String description) {
this.type = type;
this.suffix = suffix;
this.description = description;
}
public Integer getType() {
return type;
}
public String getSuffix() {
return suffix;
}
public String getDescription() {
return description;
}
public static AppUpdateTypeEnum getByType(Integer type) {
for (AppUpdateTypeEnum at : AppUpdateTypeEnum.values()) {
if (at.getType().equals(type)) {
return at;
}
}
return null;
}
}
Loading…
Cancel
Save