|
|
package com.yohoufo.order.common;
|
|
|
|
|
|
import java.util.Arrays;
|
|
|
import java.util.Collections;
|
|
|
import java.util.List;
|
|
|
|
|
|
/**
|
|
|
* Created by chenchao on 2018/9/18.
|
|
|
*/
|
|
|
public enum SellerOrderListType {
|
|
|
|
|
|
in_sale(1, "出售中",
|
|
|
Arrays.asList(OrderStatus.WAITING_PAY.getCode()),
|
|
|
Collections.<Integer>emptyList()),
|
|
|
|
|
|
WAITING_PAY(2, "待付款",
|
|
|
Collections.<Integer>emptyList(),Collections.<Integer>emptyList()),
|
|
|
|
|
|
WAITING_SEND(3, "待发货",
|
|
|
Arrays.asList(OrderStatus.SELLER_SEND_OUT.getCode(),
|
|
|
OrderStatus.HAS_PAYED.getCode(),
|
|
|
OrderStatus.PLATFORM_CHECKING.getCode()),
|
|
|
Collections.<Integer>emptyList()),
|
|
|
|
|
|
WAITING_DELIVERY(4, "待收货",
|
|
|
Arrays.asList(OrderStatus.WAITING_RECEIVE.getCode()),
|
|
|
Collections.<Integer>emptyList()),
|
|
|
|
|
|
ORDER_SUCCESS(5, "交易成功",
|
|
|
Arrays.asList(OrderStatus.DONE.getCode()),
|
|
|
Collections.<Integer>emptyList()),
|
|
|
|
|
|
ORDER_FAILED(6, "交易失败", Arrays.asList(OrderStatus.SELLER_CANCEL_BEFORE_PAY.getCode(),
|
|
|
OrderStatus.SELLER_CANCEL_AFTER_PAY.getCode(),
|
|
|
OrderStatus.SEND_OUT_TIMEOUT.getCode(),
|
|
|
OrderStatus.CHECKING_FAKE.getCode(),
|
|
|
OrderStatus.BUYER_CANCEL_BEFORE_PAY.getCode(),
|
|
|
OrderStatus.BUYER_CANCEL_TIMEOUT.getCode(),
|
|
|
OrderStatus.CUSTOMER_SERVICE.getCode()),
|
|
|
Collections.<Integer>emptyList());
|
|
|
|
|
|
int type;
|
|
|
|
|
|
String desc;
|
|
|
|
|
|
List<Integer> sellerStatus;
|
|
|
|
|
|
List<Integer> buyerStatus;
|
|
|
|
|
|
SellerOrderListType(int type, String desc, List<Integer> buyerStatus, List<Integer> sellerStatus) {
|
|
|
this.type = type;
|
|
|
this.desc = desc;
|
|
|
this.buyerStatus = buyerStatus;
|
|
|
this.sellerStatus = sellerStatus;
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 检查是否存在该中查询类型
|
|
|
* @param code
|
|
|
* @return
|
|
|
*/
|
|
|
public static SellerOrderListType getOrderListType(int code){
|
|
|
for(SellerOrderListType v : values()){
|
|
|
if(v.type == code){
|
|
|
return v;
|
|
|
}
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
public int getType() {
|
|
|
return type;
|
|
|
}
|
|
|
|
|
|
public List<Integer> getBuyerStatus() {
|
|
|
return buyerStatus;
|
|
|
}
|
|
|
} |
...
|
...
|
|