'线上支付', self::PAY_MODE_OFFLINE => '线下支付', ]; } public static function getPayModeText($pay_mode) { return self::getPayModeList()[$pay_mode] ?? '未知'; } public static function getOrderTypeList() { return [ self::TYPE_NORMAL => '普通订单', self::TYPE_GROUP => '拼团订单', self::TYPE_SECKILL => '秒杀订单', self::TYPE_PRESALE => '预售订单', ]; } public static function getOrderTypeText($type) { return self::getOrderTypeList()[$type] ?? '未知类型'; } public static function getDeliveryTypeList() { return [ self::DELIVERY_TYPE_EXPRESS => '快递配送', self::DELIVERY_TYPE_PICKUP => '门店自提', self::DELIVERY_TYPE_LOCAL => '同城配送', self::DELIVERY_TYPE_VIRTUAL => '无需配送', ]; } public static function getDeliveryTypeText($deliveryType) { return self::getDeliveryTypeList()[$deliveryType] ?? '未知'; } public static function getInvoiceStatusList() { return [ self::INVOICE_STATUS_UNAVAILABLE => '不可开具', self::INVOICE_STATUS_NOT_APPLIED => '未申请', self::INVOICE_STATUS_APPLIED => '已申请', self::INVOICE_STATUS_ISSUED => '已开具', ]; } public static function getInvoiceStatusText($invoiceStatus) { return self::getInvoiceStatusList()[$invoiceStatus] ?? '未知'; } public static function getActivityTypeList() { return [ self::ACTIVITY_TYPE_NORMAL => '普通活动', self::ACTIVITY_TYPE_SECKILL => '秒杀活动', self::ACTIVITY_TYPE_GROUP => '拼团活动', self::ACTIVITY_TYPE_PRESALE => '预售活动', self::ACTIVITY_TYPE_DISCOUNT => '折扣活动', ]; } public static function getActivityTypeText($activityType) { return self::getActivityTypeList()[$activityType] ?? $activityType; } public static function getActionTypeList() { return [ self::ACTION_TYPE_CREATE => '创建订单', self::ACTION_TYPE_PAY => '支付订单', self::ACTION_TYPE_SHIP => '发货', self::ACTION_TYPE_RECEIVE => '确认收货', self::ACTION_TYPE_CANCEL => '取消订单', self::ACTION_TYPE_REFUND => '退款', self::ACTION_TYPE_RETURN => '退货', self::ACTION_TYPE_COMPLETE => '完成订单', ]; } public static function getActionTypeText($actionType) { return self::getActionTypeList()[$actionType] ?? $actionType; } const STATUS_TEXT_MAP = [ self::STATUS_CREATE => '未付款', self::STATUS_CANCEL => "已取消", self::STATUS_AUTO_CANCEL => "已取消(系统)", self::STATUS_ADMIN_CANCEL => "已取消(管理员)", self::STATUS_PAY => "已付款", self::STATUS_REFUND => "订单取消,退款中", self::STATUS_REFUND_CONFIRM => "已退款", self::STATUS_GROUPON_TIMEOUT => "已超时团购", self::STATUS_SHIP => "已发货", self::STATUS_CONFIRM => "已完成", self::STATUS_AUTO_CONFIRM => "已收货(系统)", ]; public static function getOrderStatusList() { return self::STATUS_TEXT_MAP; } public static function getOrderStatusText($status) { return self::STATUS_TEXT_MAP[$status] ?? '未知'; } const SHOW_TYPE_ALL = 0;//全部订单 const SHOW_TYPE_WAIT_PAY = 1;//待付款订单 const SHOW_TYPE_WAIT_DELIVERY = 2;//待发货订单 const SHOW_TYPE_WAIT_RECEIPT = 3;//待收货订单 const SHOW_TYPE_WAIT_COMMENT = 4;//待评价订单 const SHOW_TYPE_STATUS_MAP = [ self::SHOW_TYPE_ALL => [], self::SHOW_TYPE_WAIT_PAY => [self::STATUS_CREATE], self::SHOW_TYPE_WAIT_DELIVERY => [self::STATUS_PAY], self::SHOW_TYPE_WAIT_RECEIPT => [self::STATUS_SHIP], self::SHOW_TYPE_WAIT_COMMENT => [self::STATUS_CONFIRM], ]; }