智简魔方文档

根据模块获取商品列表

方法概览

项目内容
文档类型PHP 类方法
方法标识app\common\model\ProductModel::resModuleProductList
所属业务商品管理
来源模块/系统商品模型

功能说明

根据模块获取商品列表

调用示例

$param = ['module' => 'string'];
$result = (new \app\common\model\ProductModel())->resModuleProductList($param);

参数

参数类型必填默认值校验规则说明
param.modulestring模块名称

返回值

返回项类型说明
listarray一级分组列表
list[].idint一级分组ID
list[].namestring一级分组名称
list[].childarray二级分组
list[].child[].idint二级分组ID
list[].child[].namestring二级分组名称
list[].child[].childarray商品
list[].child[].child[].idint商品ID
list[].child[].child[].namestring商品名称

正常返回

{
  "list": [
    {
      "id": 1,
      "name": "示例名称",
      "child": [
        {
          "id": 1,
          "name": "示例名称",
          "child": [
            {
              "id": 1,
              "name": "示例名称"
            }
          ]
        }
      ]
    }
  ]
}

异常情况

异常类型说明
Throwable调用失败时由具体实现抛出异常,异常信息以运行时结果为准。