package cn.superdesk.uniorder.common.enums.lnss;

/**
 * @author kite
 * @version 1.0
 * @date 2019/8/8
 */
public enum ExceptionMsg {

    //6001-6999




    //字段为空 6001-6040
    USER_MOBILE_EMPTY(6001,"用户电话为空"),
    ADDRESS_EMPTY(6002,"收货地址为空"),
    RECIPIENT_EMPTY(6003,"收件人为空"),
    ENTERPROSE_EMPTY(6004,"用户所属企业名称为空"),
    PAYMENT_TYPE_EMPTY(6005,"支付类型为空"),
    PROJECT_ID_EMPTY(6006, "项目Id为空"),
    ORDER_PAY_NO_EMPTY(6007, "支付订单号为空"),
    OPEN_ID_EMPTY(6008, "支付失败,请重新支付"),
    STATUS_EMPTY(6009, "状态为空"),
    CODE_EMPTY(6010, "code为空"),
    SESSION_EMPTY(6010, "session为空"),
    OPERATIONTYPE_EMPTY(6011, "operationType为空"),
    OPERATIONSCENTER_EMPTY(6011, "运营中心为空"),
    MERCHANT_EMPTY(6012, "订单含有不在服务时间内的商户商品"),


    //错误 6041-6080
    ORDER_STATUS_ERROR(6041, "订单已被接"),
    ORDER_CANCEL_STATUS_ERROR(6042, "订单已经被取消"),
    ORDER_PAY_NO_ERROR(6043, "订单号异常"),
    SHOPPING_CART_EMPTY(6043, "购物车为空"),
    ORDER_ADMIN_STATUS_ERROR(6044, "订单状态不正确"),
    PAY_NO_FINISH(6045, "支付结果正在处理中,请稍后重试"),

    //接口调用错误 6081-6100
    INTERFACE_PAY_ERROR(6081, "统一下单接口调用失败"),
    INTERFACE_ORDER_ERROR(6082, "订单下单接口调用失败"),
    APPRAISE_ERROR(6083, "评论接口调用失败"),
    OPENID_ERROR(6084, "获取openId接口调用失败"),
    INTERFACE_ERROR(6085,"接口调用失败:%s"),
    KAFAK_SEND_ERROR(6086, "kafka发送失败"),


    // 配送员 6101-6150
    DELIVERY_STAFF_EMPTY_ID(6101,"配送员Id为空"),
    DELIVERY_STAFF_EMPTY_USER_TYPE(6102,"配送员类型为空"),
    DELIVERY_STAFF_NOT_EXIST_USER_TYPE(6103,"配送员类型不存在"),
    DELIVERY_STAFF_EMPTY_ACCOUNT(6104,"账号为空"),
    DELIVERY_STAFF_EMPTY_PASSWORD(6105,"密码为空"),
    DELIVERY_STAFF_EMPTY_USER_NAME(6106,"姓名为空"),
    DELIVERY_STAFF_EMPTY_TELEPHONE(6107,"手机号码为空"),
    DELIVERY_STAFF_EMPTY_PROJECT(6108,"项目列表为空"),
    DELIVERY_STAFF_NOT_EXIST_OPERATIONS_CENTER_ID(6109,"运营中心Id为空"),
    DELIVERY_STAFF_NOT_EXIST_OPERATIONS_CENTER(6110,"运营中心为空"),
    DELIVERY_STAFF_NOT_EXIST_PROJECT_ID(6111,"项目Id为空"),
    DELIVERY_STAFF_NOT_EXIST_PROJECT_NAME(6112,"项目名称为空"),
    DELIVERY_STAFF_EMPTY_SALE(6113,"商户列表为空"),
    DELIVERY_STAFF_NOT_EXIST_SALE_ID(6114,"商户Id为空"),
    DELIVERY_STAFF_NOT_EXIST_SALE_NAME(6115,"商户名称为空"),
    DELIVERY_STAFF_FAIL_SYNC_DATA(6116,"配送员资料同步失败,错误信息:%s"),
    // 商品分类 6151-6200
    PRODUCT_CATEGORY_EMPTY_ID(6151,"商品分类为空"),
    PRODUCT_CATEGORY_EMPTY_CATEGORY_NAME(6152,"商品分类名称为空"),
    PRODUCT_CATEGORY_EMPTY_SEQ(6153,"商品分类排序为空"),
    PRODUCT_CATEGORY_EMPTY_DESCR(6154,"商品分类描述为空"),
    PRODUCT_REPETITION(6155,"商品重复"),
    // 文件 6201-6250
    FILE_EMPTY_URL(6201,"文件地址为空"),
    FILE_EMPTY_SEQ(6202,"文件排序为空"),
    FILE_EMPTY(6203,"文件列表为空"),
    // 商品 6251-6300
    PRODUCT_EMPTY_APPROVE_STATUS(6251,"审核结果为空"),
    PRODUCT_NOT_EXIST_APPROVE_STATUS(6252,"审核结果不匹配"),
    PRODUCT_EMPTY_APPROVE_DESCR(6253,"审核意见为空"),
    PRODUCT_EMPTY_ID(6254,"商品Id为空"),
    PRODUCT_EMPTY_PRODUCT_NAME(6255,"商品名称为空"),
    PRODUCT_EMPTY_PRICE(6256,"单价为空"),
    PRODUCT_EMPTY_UNIT(6257,"单位为空"),
    PRODUCT_EMPTY_DESCR(6258,"描述为空"),
    PRODUCT_EMPTY_SEQ(6259,"排序为空"),
    PRODUCT_EMPTY_PRODUCT_CATEGORY_ID(6260,"商品类型Id为空"),
    PRODUCT_NOT_EXISTS_PRODUCT_CATEGORY_ID(6261,"商品类型Id不存在"),
    PRODUCT_EMPTY_OPERATIONS_CENTER_ID(6262,"运营中心Id为空"),
    PRODUCT_EMPTY_OPERATIONS_CENTER(6263,"运营中心为空"),
    PRODUCT_EMPTY_PROJECT_ID(6264,"项目Id不能为空"),
    PRODUCT_EMPTY_PROJECT_NAME(6265,"项目名称不能为空"),
    PRODUCT_EMPTY_SALE_ID(6266,"商户Id为空"),
    PRODUCT_EMPTY_SALE_NAME(6267,"商户名称为空"),
    PRODUCT_SALE_NAME_ERROR(6268,"导入错误,%s商户名称不正确"),
    CONFIG_ERROR(6269,"配置名称不可重复"),
    PRODUCT_PRODUCT_PRICE_ERROR(6270,"导入错误,%s商品价格不正确"),
    PRODUCT_COSTPRICE_PRICE_ERROR(6270,"导入错误,%s成本价格不正确"),
    PRODUCT_COSTPRICE_PRICE_SMALL_ERROR(6270,"导入错误,%s成本价格小于零"),
    PRODUCT_COSTPRICE_PRICE_RECOVERY_ERROR(6270,"导入错误,%s回收物品和当前项目配置的不匹配"),
    PRODUCT_COSTPRICE_PRICE_RPRODUCTCATEGORY_ERROR(6270,"导入错误,%s分类和当前项目配置的不匹配"),
    PROJECT_NO_SALE(6271,"项目无商户"),
    PRODUCT_PRODUCT_DESCR_ERROR(6272,"导入错误,%s商品描述过长"),
    PRODUCT_PRODUCT_NAME_ERROR(6273,"导入错误,%s商品名称过长"),
    PRODUCT_PRODUCT_EMPTY_NAME_ERROR(6273,"导入错误,%s商品名称为空或请删除空行"),
    QUANTITY_MODIFY_ERROR(6273,"修改失败,可能存在同时修改的情况"),
    DISCOUNT_ALREADY_EXISTS(6274, "该项目和运营中心下的企业%s已经设置过折扣率"),
    PRODUCT_ALREADY_EXISTS(6275, "企业:%s 下有商品:%s 已经设置过折扣价"),
    QUANTITY_ERROR(6276,"库存不能小于0"),
    // 订单 6301-6350
    ORDER_EMPTY_ID(6301,"订单Id为空"),
    ORDER_EMPTY_CARRIER_ID(6302,"配送员Id为空"),
    ORDER_NOT_EXIST_CARRIER_ID(6303,"配送员Id不存在"),
    ORDER_EMPTY_CONFIRM_STATUS(6304,"确认状态为空"),
    ORDER_NOT_EXIST_CONFIRM_STATUS(6305,"确认状态不存在"),
    ORDER_EMPTY_REMARK(6306,"确认原因不能为空"),
    PLAN_TIME_NULL(6307,"预约时间不能为空"),
    RECOVERY_NUM_ERROR(6308,"回收数量有误"),
    ORDER_ERROR_ID(6309,"订单Id错误"),
    ORDER_ERROR_STATUS(6310,"订单状态错误"),
    ORDER_CANCEL_FAIL(6311,"当前同时取消的订单过多,请稍后再试"),
    // 报表 6401-6450
    REPORT_TYPE_ERROR(6401,"type输入错误"),
    // 库存 6451-6500
    STOCK_LESS_THAN_ZERO(6451,"库存小于0"),
    STOCK_SAVE_NOT_EQUAL(6452,"有保存失败的记录(可能由于版本号冲突引起的)"),
    STOCK_SAVE_FAIL(6453,"抱歉,商品 %s 库存不足,请选购其它商品！")
    ;

    private int code;
    private String msg;

    ExceptionMsg(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
