Authored by sailing-PC\sailing

add base map data

... ... @@ -12,7 +12,8 @@ public enum ButtonShow {
/*卖家相关*/
PAY_EARNESTMONEY("pay_earnestMoney","支付保证金"),
NOT_SOLD("not_sold","不卖了"),
DELIVER_GOODS("deliver_goods","我要发货")
DELIVER_GOODS("deliver_goods","我要发货"),
SOLD_AGAIN("sold_again","再次出售")
;
String code;
... ...
package com.yohoufo.order.common;
import java.util.Arrays;
import java.util.Collections;
import java.util.List;
import java.util.*;
/**
* 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(
IN_SALE(1, "出售中",
Arrays.asList(
SkupStatus.CAN_NOT_SELL.getCode(),
SkupStatus.CAN_SELL.getCode(),
SkupStatus.YOHO_CANCEL_SELL.getCode(),
SkupStatus.SELF_CANCEL_PAY.getCode(),
SkupStatus.TIMEOUT_CANCEL.getCode(),
SkupStatus.SELLER_CANCEL_SELL.getCode()
)
),
WAITING_PAY(2, "待发货",
Arrays.asList(
OrderStatus.WAITING_PAY.getCode(),
OrderStatus.HAS_PAYED.getCode()
)
),
WAITING_SEND(3, "已发货",
Arrays.asList(
OrderStatus.SELLER_SEND_OUT.getCode(),
OrderStatus.PLATFORM_CHECKING.getCode()
)
),
ORDER_SUCCESS(5, "交易完成",
Arrays.asList(OrderStatus.WAITING_RECEIVE.getCode())
),
ORDER_FAILED(6, "交易失败",
Arrays.asList(
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()),
Collections.<Integer>emptyList());
OrderStatus.BUYER_CANCEL_TIMEOUT.getCode()
)
);
int type;
String desc;
List<Integer> sellerStatus;
List<Integer> buyerStatus;
List<Integer> status;
SellerOrderListType(int type, String desc, List<Integer> buyerStatus, List<Integer> sellerStatus) {
SellerOrderListType(int type, String desc, List<Integer> status) {
this.type = type;
this.desc = desc;
this.buyerStatus = buyerStatus;
this.sellerStatus = sellerStatus;
this.status = status;
}
static Map<Integer, SellerOrderListType> localCache = new HashMap<>(8);
static {
for(SellerOrderListType v : values()){
localCache.put(v.type, v);
}
}
/**
* 检查是否存在该中查询类型
* @param code
* @return
*/
public static SellerOrderListType getOrderListType(int code){
for(SellerOrderListType v : values()){
if(v.type == code){
return v;
}
}
return null;
return localCache.get(code);
}
public int getType() {
return type;
}
public List<Integer> getBuyerStatus() {
return buyerStatus;
public List<Integer> getStatus() {
return status;
}
}
... ...
... ... @@ -4,26 +4,22 @@ package com.yohoufo.order.common;
public enum SellerOrderStatus {
WAITING_PAY(0, "待付保证金", new ButtonShow[]{ButtonShow.PAY_EARNESTMONEY,ButtonShow.NOT_SOLD}),
SELLER_CANCEL_PAY(1, "上架关闭(卖家取消支付)", new ButtonShow[]{ButtonShow.SHOW_DETAIL}),
SELLER_CANCEL_TIMEOUT(2, "上架关闭(卖家支付超时)", new ButtonShow[]{ButtonShow.SHOW_DETAIL}),
HAS_PAYED(3, "已支付", new ButtonShow[]{ButtonShow.SHOW_DETAIL, ButtonShow.DELIVER_GOODS, ButtonShow.NOT_SOLD}),
SELLER_CANCEL_SELL(4, "上架关闭(卖家取消出售)", new ButtonShow[]{ButtonShow.SHOW_DETAIL}),
BACKGROUNP_CANCEL_SELL(5, "上架关闭(平台取消出售)", new ButtonShow[]{ButtonShow.SHOW_DETAIL}),
HAS_SELLED(6, "已售出", new ButtonShow[]{ButtonShow.SHOW_DETAIL});
WAITING_PAY(0, "待付保证金"),
SELf_CANCEL_PAY(1, "上架关闭(卖家取消支付)"),
TIMEOUT_CANCEL_(2, "上架关闭(卖家支付超时)"),
HAS_PAYED(3, "已支付")
;
SellerOrderStatus(int code, String desc, ButtonShow[] buttonShows) {
SellerOrderStatus(int code, String desc) {
this.code = code;
this.desc = desc;
this.buttonShows = buttonShows;
}
int code;
String desc;
ButtonShow[] buttonShows;
public String getDesc() {
return desc;
... ...
package com.yohoufo.order.common;
import com.yohoufo.order.constants.OrderDetailDesc;
import java.util.Arrays;
import java.util.List;
public enum SkupStatus {
/**
* 售出
*/
SELL_OUT(2, "售出", new Node(null, null, null)),
/**
* 可售(已支付)
*/
CAN_SELL(1, "可售",
new Node(
Arrays.asList(ButtonShow.NOT_SOLD, ButtonShow.SHOW_DETAIL),
Arrays.asList(ButtonShow.NOT_SOLD),
OrderDetailDesc.Seller.PAY_FINISH
)
),
/**
* 不可售(未支付)
*/
CAN_NOT_SELL(0,"待付保证金",
new Node(
Arrays.asList(ButtonShow.NOT_SOLD, ButtonShow.PAY_EARNESTMONEY),
Arrays.asList(ButtonShow.NOT_SOLD, ButtonShow.PAY_EARNESTMONEY),
OrderDetailDesc.Seller.WAIT_PAY
)
),
CAN_SELL(1),
CAN_NOT_SELL(0);
SELF_CANCEL_PAY(20, "上架关闭(卖家取消支付)",
new Node(
Arrays.asList(ButtonShow.SOLD_AGAIN, ButtonShow.DEL_ORDER, ButtonShow.SHOW_DETAIL),
Arrays.asList(ButtonShow.DEL_ORDER, ButtonShow.SOLD_AGAIN),
OrderDetailDesc.Seller.SELF_CANCEL_BEFORE_PAY
)
),
TIMEOUT_CANCEL(21, "上架关闭(卖家支付超时)",
new Node(
Arrays.asList(ButtonShow.SOLD_AGAIN, ButtonShow.DEL_ORDER, ButtonShow.SHOW_DETAIL),
Arrays.asList(ButtonShow.DEL_ORDER, ButtonShow.SOLD_AGAIN),
OrderDetailDesc.Seller.TIME_OUT_CANCEL
)
),
SELLER_CANCEL_SELL(22, "上架关闭(卖家取消出售)",
new Node(
Arrays.asList(ButtonShow.SOLD_AGAIN, ButtonShow.DEL_ORDER, ButtonShow.SHOW_DETAIL),
Arrays.asList(ButtonShow.DEL_ORDER, ButtonShow.SOLD_AGAIN),
OrderDetailDesc.Seller.SELF_CANCEL_BEFORE_EXIST_BUY
)
),
YOHO_CANCEL_SELL(23, "上架关闭(平台取消出售)",
new Node(
Arrays.asList(ButtonShow.SOLD_AGAIN, ButtonShow.DEL_ORDER, ButtonShow.SHOW_DETAIL),
Arrays.asList(ButtonShow.DEL_ORDER, ButtonShow.SOLD_AGAIN),
OrderDetailDesc.Seller.YOHO_CANCEL_BEFORE_EXIST_BUY
)
)
;
SkupStatus(int code) {
SkupStatus(int code,String desc, Node node) {
this.code = code;
this.desc = desc;
this.node = node;
}
int code;
String desc;
Node node;
static class Node{
List<ButtonShow> listButtons;
List<ButtonShow> detailButtons;
String detailShowDesc;
public Node(List<ButtonShow> listButtons, List<ButtonShow> detailButtons, String desc) {
this.listButtons = listButtons;
this.detailButtons = detailButtons;
this.detailShowDesc = desc;
}
}
public int getCode() {
return code;
}
public void setCode(int code) {
this.code = code;
public List<ButtonShow> getListButtons() {
return node.listButtons;
}
public List<ButtonShow> getDetailButtons() {
return node.detailButtons;
}
public String getDetailShowDesc() {
return node.detailShowDesc;
}
}
... ...
... ... @@ -77,5 +77,21 @@ public interface OrderDetailDesc {
String BUYER_HAS_PAID = "买家已付款,请于48小时内发货,超时发货系统自动取消订单并下架商品,您支付的保证金将作为补偿赔付给买家";
String BUYER_NO_PAY = "等待买家付款,15分钟未付款将自动取消订单并重新上架商品";
//
String WAIT_PAY = "请在15分钟内支付保证金,超时将自动取消出售申请",
SELF_CANCEL_BEFORE_PAY = "您已取消商品出售",
TIME_OUT_CANCEL = "支付保证金超时自动取消",
PAY_FINISH = "商品已上架,等待买家购买",
SELF_CANCEL_BEFORE_EXIST_BUY = "您已取消商品售卖,保证金已退还至您的支付账户,请注意查收",
YOHO_CANCEL_BEFORE_EXIST_BUY = "系统下架,保证金已退还至您的支付账户,请注意查收,如有疑问请联系客服";
}
}
... ...