'会员提交订单', OrderLogEnum::USER_CANCEL_ORDER => '会员取消订单', OrderLogEnum::USER_DEL_ORDER => '会员删除订单', OrderLogEnum::USER_CONFIRM_ORDER => '会员确认收货', OrderLogEnum::USER_PAID_ORDER => '会员支付订单', ]; if ($log === true) { return $desc; } return isset($desc[$log]) ? $desc[$log] : $log; } /** * @notes 订单赠送积分场景 * @param $log * @return mixed|string|string[] * @author ljj * @date 2022/2/18 4:01 下午 */ public static function getOrderAward($log) { $desc = [ self::ORDER_PAY => '订单付款', self::ORDER_DELIVERY => '订单发货', self::ORDER_FINISH => '订单完成', self::ORDER_AFTER_SALE_OVER => '订单超过售后期', ]; if ($log === true) { return $desc; } return isset($desc[$log]) ? $desc[$log] : $log; } /** * @Notes: 订单状态 * @Author: 张无忌 * @param bool $type * @return array|mixed|string */ public static function getOrderStatus($type=true) { $desc = [ self::ORDER_STATUS_NO_PAID => '待支付', self::ORDER_STATUS_DELIVERY => '待发货', self::ORDER_STATUS_GOODS => '待收货', self::ORDER_STATUS_COMPLETE => '已完成', self::ORDER_STATUS_DOWN => '已关闭' ]; if ($type === true) { return $desc; } return $desc[$type] ?? '未知来源'; } /** * @Notes: 支付状态 * @Author: 张无忌 * @param bool $type * @return array|mixed|string */ public static function getPayStatus($type=true) { $desc = [ self::PAY_STATUS_NO_PAID => '待支付', self::PAY_STATUS_PAID => '已支付', self::PAY_STATUS_REFUND => '已退款', self::PAY_STATUS_REFUSE_REFUND => '拒绝退款' ]; if ($type === true) { return $desc; } return $desc[$type] ?? '未知来源'; } /** * @Notes: 退款状态 * @Author: 张无忌 * @param bool $type * @return array|mixed|string */ public static function getRefundStatus($type=true) { $desc = [ self::REFUND_STATUS_NO_REFUND => '未退款', self::REFUND_STATUS_PART_REFUND => '部分退款', self::REFUND_STATUS_ALL_REFUND => '全部退款', ]; if ($type === true) { return $desc; } return $desc[$type] ?? '未知来源'; } }