获取产品具体信息
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\HostModel::hostSpecificInfo |
| 所属业务 | 产品管理 |
| 来源模块/系统 | 产品模型 |
功能说明
获取产品具体信息,目前用于续费开关
调用示例
$id = 1;
$result = (new \app\common\model\HostModel())->hostSpecificInfo($id);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
id | int | 否 | — | — | 产品ID |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
id | int | 产品ID |
name | string | 产品标识 |
renew_amount | string | 续费金额 |
billing_cycle_name | string | 模块计费周期名称 |
due_time | int | 到期时间 |
ip_num | int | IP数量 |
dedicate_ip | string | 主IP |
assign_ip | string | 附加IP(英文逗号分隔) |
country | string | 国家 |
country_code | string | 国家代码 |
country_id | int | 国家ID |
city | string | 城市 |
area | string | 区域 |
正常返回
{
"id": 1,
"name": "示例名称",
"renew_amount": "string",
"billing_cycle_name": "monthly",
"due_time": 1752984000,
"ip_num": 1,
"dedicate_ip": "192.0.2.1",
"assign_ip": "example-token",
"country": "中国",
"country_code": "123456",
"country_id": 1,
"city": "string",
"area": "string"
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |