智简魔方文档

创建产品计费周期变更订单

方法概览

项目内容
文档类型PHP 类方法
方法标识app\common\model\OrderModel::createChangeBillingCycleOrder
所属业务订单管理
来源模块/系统订单模型

功能说明

创建产品计费周期变更订单,该方法不验证用户和产品状态,需调用前自行验证

调用示例

$param = [['host_id' => 1, 'type' => 'string', 'amount' => 'string', 'description' => '192.0.2.1', 'customfield' => ['string'], 'config_options' => ['string'], 'host_data' => ['string'], 'order_item' => ['string'], 'discount' => 0.01, 'discount_order_price' => 0.01]];
$result = (new \app\common\model\OrderModel())->createChangeBillingCycleOrder($param);

参数

参数类型必填默认值校验规则说明
paramarray参数
param.host_idintrequire产品ID
param.typestringrequire订单类型(change_billing_cycle)
param.amountstringrequire订单金额(可折扣)
param.descriptionstringrequire订单描述
param.customfieldarray自定义参数
param.config_optionsarray自定义参数,留给模块处理
param.host_dataarrayrequire变更后产品信息
param.order_itemarray追加订单子项
param.discountfloat用户等级折扣
param.discount_order_pricefloat购买可用用户等级部分

返回值

返回项类型说明
statusint状态码(200=成功,400=失败)
msgstring提示信息

正常返回

{
  "status": 1,
  "msg": "string"
}

异常情况

异常类型说明
Throwable调用失败时由具体实现抛出异常,异常信息以运行时结果为准。