根据模块获取商品列表
方法概览
| 项目 | 内容 |
|---|---|
| 文档类型 | PHP 类方法 |
| 方法标识 | app\common\model\ProductModel::resModuleProductList |
| 所属业务 | 商品管理 |
| 来源模块/系统 | 商品模型 |
功能说明
根据模块获取商品列表
调用示例
$param = ['module' => 'string'];
$result = (new \app\common\model\ProductModel())->resModuleProductList($param);参数
| 参数 | 类型 | 必填 | 默认值 | 校验规则 | 说明 |
|---|---|---|---|---|---|
param.module | string | 否 | — | — | 模块名称 |
返回值
| 返回项 | 类型 | 说明 |
|---|---|---|
list | array | 一级分组列表 |
list[].id | int | 一级分组ID |
list[].name | string | 一级分组名称 |
list[].child | array | 二级分组 |
list[].child[].id | int | 二级分组ID |
list[].child[].name | string | 二级分组名称 |
list[].child[].child | array | 商品 |
list[].child[].child[].id | int | 商品ID |
list[].child[].child[].name | string | 商品名称 |
正常返回
{
"list": [
{
"id": 1,
"name": "示例名称",
"child": [
{
"id": 1,
"name": "示例名称",
"child": [
{
"id": 1,
"name": "示例名称"
}
]
}
]
}
]
}异常情况
| 异常类型 | 说明 |
|---|---|
Throwable | 调用失败时由具体实现抛出异常,异常信息以运行时结果为准。 |