public class StatusEnums {
/**
* 0 异常/删除/ 立即发布
* 1 正常 /定时发布
*/
@Getter
@AllArgsConstructor
public static enum IsError {
ERROR(0, "异常"), NOTERROR(1, "正常");
private final Integer value;
private final String name;
public static String getName(Integer value) {
for (IsError ele : StatusEnums.IsError.values()) {
if (ele.getValue().toString().equals(value.toString())){
return ele.getName();}
}
return null;
}
}
}