| 项目 | 内容 |
|---|
| 文档类型 | 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);
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|
param | array | 否 | — | — | 参数 |
param.host_id | int | 是 | — | require | 产品ID |
param.type | string | 是 | — | require | 订单类型(change_billing_cycle) |
param.amount | string | 是 | — | require | 订单金额(可折扣) |
param.description | string | 是 | — | require | 订单描述 |
param.customfield | array | 否 | — | — | 自定义参数 |
param.config_options | array | 否 | — | — | 自定义参数,留给模块处理 |
param.host_data | array | 是 | — | require | 变更后产品信息 |
param.order_item | array | 否 | — | — | 追加订单子项 |
param.discount | float | 否 | — | — | 用户等级折扣 |
param.discount_order_price | float | 否 | — | — | 购买可用用户等级部分 |
| 返回项 | 类型 | 说明 |
|---|
status | int | 状态码(200=成功,400=失败) |
msg | string | 提示信息 |
{
"status": 1,
"msg": "string"
}
| 异常类型 | 说明 |
|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |