package com.platform.constant;

/**
 * Created by Hb_zzZ on 2020/3/31.
 */
public class ConstantExcel {

    public static final String[] ORDEREXCELCOLENNAME = {
            // 0    1        2        3
            "序号","订单号","店铺名称","会员昵称",
            // 4         5     6         7
            "商品名称","数量","订单类型","订单状态",
            // 8           9      10        11        12
            "发货状态","付款状态","快递公司","快递单号", "订单原价",
            // 13         14         15      16      17
            "实际支付金额","运费" , "下单时间","收货人","收货地址",
            //18         19
            "联系电话","订单详情"
    };

    //订单类型 1：普通订单 2：团购订单 3：砍价订单 4: 直接购买
    public static final String getOrderType(String orderType){
        String status = "";
        if(null == orderType){
            return status;
        }
        switch (orderType){
            case "1":
                status = "普通订单";
                break;
            case "2":
                status = "团购订单";
                break;
            case "3":
                status = "砍价订单";
                break;
            case "4":
                status = "直接购买";
                break;
        }
        return status;
    }

    //订单状态
    //订单相关状态字段设计，采用单个字段表示全部的订单状态
    //1xx 表示订单取消和删除等状态 0订单创建成功等待付款，　101订单已取消，　102订单已删除
    //2xx 表示订单支付状态　201订单已付款，等待发货
    //3xx 表示订单物流相关状态　300订单已发货， 301用户确认收货
    //4xx 表示订单退换货相关的状态　401 没有发货，退款　402 已收货，退款退货
    //5xx 表示订单最终状态 501已完成
    public static final String getOrderStatus(Integer orderStatus){
        String status = "";
        if(null == orderStatus){
            return status;
        }
        switch (orderStatus){
            case 0:
                status = "待付款";
                break;
            case 101:
                status = "订单已取消";
                break;
            case 102:
                status = "订单已删除";
                break;
            case 201:
                status = "订单已付款";
                break;
            case 1:
                status = "订单已发货";
                break;
            case 2:
                status = "用户确认收货";
                break;
            case 401:
                status = "没有发货，退款";
                break;
            case 402:
                status = "已收货，退款退货";
                break;
            case 501:
                status = "已完成";
                break;
        }
        return status;
    }

    //发货状态 商品配送情况;0未发货,1已发货,2已收货,4退货
    public static final String getOrderShippingStatus(Integer shippingStatus){
        if(null == shippingStatus){
            return "";
        }
        String status = "";
        switch (shippingStatus){
            case 0:
                status = "未发货";
                break;
            case 1:
                status = "已发货";
                break;
            case 2:
                status = "已收货";
                break;
            case 4:
                status = "退货";
                break;
        }
        return status;
    }

    //付款状态 支付状态;0未付款;1付款中;2已付款;4退款
    public static final String getOrderPayStatus(Integer payStatus){
        String status = "";
        if(null == payStatus){
            return status;
        }
        switch (payStatus){
            case 0:
                status = "未付款";
                break;
            case 1:
                status = "付款中";
                break;
            case 2:
                status = "已付款";
                break;
            case 4:
                status = "退款";
                break;
        }
        return status;
    }
}
