枚举添加数据状态字段

yun-zuoyi
Silliter 6 years ago
parent bbfd340fd0
commit 148d808129

@ -2068,4 +2068,46 @@ public class WmsEnumUtil {
return null;
}
}
/**
*
*/
@JsonFormat(shape = JsonFormat.Shape.OBJECT)
public enum DATA_STATUS {
ENABLE(1, "启用", "fa fa-success cell-fa fa-check"),
DISABLE(2, "禁用", "fa fa-disabled cell-fa fa-times-circle"),
LOCKING(3, "全部", "fa cell-fa fa-lock");
private int value;
private String description;
private String code;
DATA_STATUS(int value, String code, String description){
this.value = value;
this.description = description;
this.code = code;
}
public int getValue () {
return value;
}
public String getDescription () {
return description;
}
public String getCode() {
return code;
}
public static String valueOf (int val){
String tmp = null;
for (int i = 0; i < values().length; i++) {
if (values()[i].value == val) {
tmp = values()[i].getDescription();
}
}
return tmp;
}
}
}

Loading…
Cancel
Save