package com.nova.sankuai.domain.enums.vipservice;
|
|
import io.swagger.annotations.ApiModel;
|
import org.apache.commons.lang.StringUtils;
|
|
/**
|
* @author weikangdi
|
* @create 2022/1/5
|
*/
|
@ApiModel(value = "系统订单状态枚举")
|
public enum VipCardOrderEnum {
|
|
/**
|
* 订单状态:
|
*/
|
STATUS_CLOSE("CLOSE", "订单关闭"),
|
STATUS_INIT("INIT", "创建订单"),
|
STATUS_WAIT("Wait", "等待订单通知"), // 闪态单独添加的
|
STATUS_END("END", "订单完成"),
|
STATUS_INVALID("INVALID", "订单无效"),
|
;
|
private String code;
|
private String message;
|
|
VipCardOrderEnum(String code, String message) {
|
this.code = code;
|
this.message = message;
|
}
|
|
public static String message(String code) {
|
if (StringUtils.isNotEmpty(code)) {
|
for (VipCardOrderEnum m : VipCardOrderEnum.values()) {
|
if (m.getCode().equals(code)) {
|
return m.getMessage();
|
}
|
}
|
}
|
return null;
|
}
|
|
public String getCode() {
|
return code;
|
}
|
|
public void setCode(String code) {
|
this.code = code;
|
}
|
|
public String getMessage() {
|
return message;
|
}
|
|
public void setMessage(String value) {
|
this.message = value;
|
}
|
}
|