package com.yida.data.device.convertor.telephone;

import com.alibaba.excel.converters.Converter;
import com.alibaba.excel.enums.CellDataTypeEnum;
import com.alibaba.excel.metadata.CellData;
import com.alibaba.excel.metadata.GlobalConfiguration;
import com.alibaba.excel.metadata.property.ExcelContentProperty;

public class OrderStatusConvertor implements Converter<Integer> {
    @Override
    public Class supportJavaTypeKey() {
        return null;
    }

    @Override
    public CellDataTypeEnum supportExcelTypeKey() {
        return null;
    }

    @Override
    public Integer convertToJavaData(CellData cellData, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
        return null;
    }

    @Override
    public CellData convertToExcelData(Integer value, ExcelContentProperty contentProperty, GlobalConfiguration globalConfiguration) throws Exception {
        String res = null;
        switch (value) {
            case 0:
                res = "待付款";
                break;
            case 1:
                res = "付款中";
                break;
            case 2:
                res = "交易完成";
                break;
            case 3:
                res = "待付款";
                break;
            case 4:
                res = "交易关闭";
                break;
        }
        return new CellData(res);
    }
}
