...
|
...
|
@@ -9,19 +9,20 @@ public enum ShareOrdersStatusEnum { |
|
|
|
|
|
//10-已支付 -> 20-可结算、91-不可结算取消、92-不可结算退货、93-不可结算换货、100 因拆单作废
|
|
|
//20-可结算 -> 30-打款中 -> 40-已打款
|
|
|
PAY(1,"10","已支付"),
|
|
|
CAN_SETTLE(2,"20","可结算"),
|
|
|
SETTLE(3,"30","打款中"),
|
|
|
HAS_SETTLE(4,"40","已打款"),
|
|
|
ORDER_CANCEL(2,"91","不可结算取消"),
|
|
|
ORDER_RETURN(2,"92","不可结算退货"),
|
|
|
ORDER_EXCHANGE(2,"93","不可结算换货"),
|
|
|
ORDER_DISCARD(2,"100","因拆单作废"),//前台不展示100类
|
|
|
ACTIVITY_DISCARD(2,"200","活动作废");//前台不展示200类
|
|
|
PAY(1,"10","已支付","待确认"),
|
|
|
CAN_SETTLE(2,"20","可结算","已达成"),
|
|
|
SETTLE(3,"30","打款中","打款中"),
|
|
|
HAS_SETTLE(4,"40","已打款","已打款"),
|
|
|
ORDER_CANCEL(2,"91","不可结算取消","未达成"),
|
|
|
ORDER_RETURN(2,"92","不可结算退货","未达成"),
|
|
|
ORDER_EXCHANGE(2,"93","不可结算换货","未达成"),
|
|
|
ORDER_DISCARD(2,"100","因拆单作废","未达成"),//前台不展示100类
|
|
|
ACTIVITY_DISCARD(2,"200","活动作废","未达成");//前台不展示200类
|
|
|
|
|
|
private int level;//低level可以变为高level
|
|
|
private String code;
|
|
|
private String desc;
|
|
|
private String otherDesc;
|
|
|
|
|
|
ShareOrdersStatusEnum(int level,String code, String desc) {
|
|
|
this.level = level;
|
...
|
...
|
@@ -29,6 +30,13 @@ public enum ShareOrdersStatusEnum { |
|
|
this.desc = desc;
|
|
|
}
|
|
|
|
|
|
ShareOrdersStatusEnum(int level,String code, String desc, String otherDesc) {
|
|
|
this.level = level;
|
|
|
this.code = code;
|
|
|
this.desc = desc;
|
|
|
this.otherDesc = otherDesc;
|
|
|
}
|
|
|
|
|
|
public static int getLevelByCode(String code) {
|
|
|
for (ShareOrdersStatusEnum e : values()) {
|
|
|
if (e.getCode().equals(code)) {
|
...
|
...
|
@@ -51,6 +59,18 @@ public enum ShareOrdersStatusEnum { |
|
|
return null;
|
|
|
}
|
|
|
|
|
|
public static String getOtherDescByCode(String code){
|
|
|
if(StringUtils.isEmpty(code)){
|
|
|
return null;
|
|
|
}
|
|
|
for(ShareOrdersStatusEnum e:values()){
|
|
|
if (code.equals(e.getCode())) {
|
|
|
return e.getOtherDesc();
|
|
|
}
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
public static boolean isFailOrder(String status) {
|
|
|
return (!status.equals(ShareOrdersStatusEnum.CAN_SETTLE)) && (ShareOrdersStatusEnum.getLevelByCode(status)==2);
|
|
|
}
|
...
|
...
|
@@ -77,4 +97,12 @@ public enum ShareOrdersStatusEnum { |
|
|
public void setDesc(String desc) {
|
|
|
this.desc = desc;
|
|
|
}
|
|
|
|
|
|
public String getOtherDesc() {
|
|
|
return otherDesc;
|
|
|
}
|
|
|
|
|
|
public void setOtherDesc(String otherDesc) {
|
|
|
this.otherDesc = otherDesc;
|
|
|
}
|
|
|
} |
...
|
...
|
|