获取产品按需转包年包月周期价格
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\HostModel::onDemandToRecurringPrepaymentDurationPrice |
| 所属业务 | 财务管理 |
| 来源模块/系统 | 产品模型 |
功能说明
获取产品按需转包年包月周期价格
调用示例
$param = [['id' => 1]];
$result = (new \app\common\model\HostModel())->onDemandToRecurringPrepaymentDurationPrice($param);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
param | array | 否 | — | — | 参数 |
param.id | int | 是 | — | require | 产品ID |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
status | int | 状态码(200=成功,400=失败) |
msg | string | 提示信息 |
data.duration | array | 可转换周期 |
data.duration[].id | int | 周期ID |
data.duration[].price | string | 周期价格 |
data.duration[].billing_cycle | string | 周期原名称 |
data.duration[].name_show | string | 周期显示名称 |
data.duration[].base_price | string | 基础价格 |
正常返回
{
"status": 1,
"msg": "string",
"data": {
"duration": [
{
"id": 1,
"price": "string",
"billing_cycle": "monthly",
"name_show": "示例名称",
"base_price": "string"
}
]
}
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |