会员中心已订购产品列表
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\HostModel::clientHostList |
| 所属业务 | 用户管理 |
| 来源模块/系统 | 产品模型 |
功能说明
会员中心已订购产品列表
调用示例
$param = ['keywords' => '示例关键字', 'status' => 'Active', 'tab' => 'string', 'page' => 1, 'limit' => 1];
$result = (new \app\common\model\HostModel())->clientHostList($param);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
param.keywords | string | 否 | — | — | 关键字搜索:商品名称/产品名称/IP |
param.status | string | 否 | — | — | 产品状态(Unpaid=未付款,Pending=开通中,Active=已开通,Suspended=已暂停,Deleted=已删除) |
param.tab | string | 否 | — | — | 状态using使用中expiring即将到期overdue已逾期deleted已删除 |
param.page | int | 否 | — | — | 页数 |
param.limit | int | 否 | — | — | 每页条数 |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
list | array | 产品 |
list[].id | int | 产品ID |
list[].product_id | int | 商品ID |
list[].product_name | string | 商品名称 |
list[].name | string | 标识 |
list[].create_time | int | 订购时间 |
list[].due_time | int | 到期时间 |
list[].status | string | 状态Unpaid未付款Pending开通中Active已开通Suspended已暂停Deleted已删除Failed开通失败 |
list[].client_notes | string | 用户备注 |
list[].type | string | 类型 |
list[].ip | string | IP |
count | int | 产品总数 |
using_count | int | 使用中产品数量 |
expiring_count | int | 即将到期产品数量 |
overdue_count | int | 已逾期产品数量 |
deleted_count | int | 已删除产品数量 |
all_count | int | 全部产品数量 |
正常返回
{
"list": [
{
"id": 1,
"product_id": 1,
"product_name": "示例名称",
"name": "示例名称",
"create_time": 1752984000,
"due_time": 1752984000,
"status": "Active",
"client_notes": "示例说明",
"type": "string",
"ip": "192.0.2.1"
}
],
"count": 1,
"using_count": 1,
"expiring_count": 1,
"overdue_count": 1,
"deleted_count": 1,
"all_count": 1
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |