package biz.policy;
|
|
public enum OrderLineType {
|
|
ListPrice("标准价"), OnsitePrice("即时优惠价"), OnsiteQty("即时买赠"), OncePrice("一次性优惠价"), OnceQty("一次性买赠"), RebateQty("买赠奖励"), RebateAmt("积分奖励"), Package("套包"),
|
Customize("自定义价格"), Other("其他");
|
|
private String name;
|
|
OrderLineType(String name) {
|
this.name = name;
|
}
|
|
public static OrderLineType parse(String value) {
|
if (value == null) {
|
return ListPrice;
|
}
|
|
value = value.toLowerCase();
|
|
if ("listprice".equals(value)) {
|
return ListPrice;
|
}
|
else if ("onsiteqty".equals(value)) {
|
return OnsiteQty;
|
}
|
else if ("onsiteprice".equals(value)) {
|
return OnsitePrice;
|
}
|
else if ("onceprice".equals(value)) {
|
return OncePrice;
|
}
|
else if ("onceqty".equals(value)) {
|
return OnceQty;
|
}
|
else if ("rebateqty".equals(value)) {
|
return RebateQty;
|
}
|
else if ("rebateamt".equals(value)) {
|
return RebateAmt;
|
}
|
else if ("package".equals(value)) {
|
return Package;
|
}
|
else if ("customize".equals(value)) {
|
return Customize;
|
}
|
else if ("other".equals(value)) {
|
return Other;
|
}
|
|
return ListPrice;
|
}
|
|
public String getName() {
|
return name;
|
}
|
|
}
|