简要描述:
- 根据父分类id,查询子分类
接口版本:
版本号 | 制定人 | 制定日期 | 修订日期 |
---|---|---|---|
无 | 崔岩龙 | 2019-5-6 | 2019-5-6 |
请求URL:
- /product/userCategory/getCategoryByParentId
请求方式:
- POST
请求参数:
参数名 | 是否必须 | 类型 | 说明 |
---|---|---|---|
parentId | 是 | Long | 父级分类id |
companyId | 是 | String | 公司id |
返回示例:
正确时返回:
{
"body": [
{
"categoryCode": "YAML",
"categoryName": "辅助材料",
"children": null,
"createTime": null,
"description": null,
"iconUrl": null,
"id": 301,
"isGuide": null,
"isLastNode": 1,
"level": 1,
"parentId": 0,
"parentIds": null,
"sort": null,
"status": 1
},
{
"categoryCode": "YEQP",
"categoryName": "设备配件",
"children": null,
"createTime": null,
"description": null,
"iconUrl": null,
"id": 302,
"isGuide": null,
"isLastNode": 1,
"level": 1,
"parentId": 0,
"parentIds": null,
"sort": null,
"status": 1
},
{
"categoryCode": "YERP",
"categoryName": "包装物",
"children": null,
"createTime": null,
"description": null,
"iconUrl": null,
"id": 303,
"isGuide": null,
"isLastNode": 1,
"level": 1,
"parentId": 0,
"parentIds": null,
"sort": null,
"status": 1
},
{
"categoryCode": "YGPA",
"categoryName": "劳保/办公用品",
"children": null,
"createTime": null,
"description": null,
"iconUrl": null,
"id": 304,
"isGuide": null,
"isLastNode": 1,
"level": 1,
"parentId": 0,
"parentIds": null,
"sort": null,
"status": 1
},
{
"categoryCode": "YMAM",
"categoryName": "熔炼铝液",
"children": null,
"createTime": null,
"description": null,
"iconUrl": null,
"id": 305,
"isGuide": null,
"isLastNode": 1,
"level": 1,
"parentId": 0,
"parentIds": null,
"sort": null,
"status": 1
},
{
"categoryCode": "YMCT",
"categoryName": "刀具",
"children": null,
"createTime": null,
"description": null,
"iconUrl": null,
"id": 306,
"isGuide": null,
"isLastNode": 1,
"level": 1,
"parentId": 0,
"parentIds": null,
"sort": null,
"status": 1
}
],
"ok": true,
"status": {
"description": null,
"message": null,
"path": null,
"returnCode": "200",
"serviceCode": null,
"time": null
}
}
错误时返回:
{
"body": null,
"ok": false,
"status": {
"description": null,
"message": "Required Long parameter 'parentId' is not present",
"path": "/product/userCategory/getCategoryByParentId",
"returnCode": "99999",
"serviceCode": "kxl-product-service",
"time": 1557222709463
}
}
返回参数说明:
参数名 | 类型 | 说明 |
---|---|---|
无 | List | 分类集合 |
id | Long | 主键id |
categoryName | String | 分类名称 |
categoryCode | String | 分类编码 |
iconUrl | String | 分类图片 |
parentId | Long | 父节点id |
parentIds | List | 父级分类数组,由大到小 |
description | String | 分类描述 |
isGuide | Integer | 是否为导航栏. 0:不是 1:是 |
sort | Integer | 排序,由小到大 |
level | Integer | 层级 |
isLastNode | Integer | 是否为分类叶子节点。0:非叶子节点 1:叶子节点 |
status | Integer | 分类状态, 0:不可用 1:可用 |
createTime | String | 创建时间 |
children | List | 子分类 |
文档更新时间: 2019-09-12 09:31 作者:崔岩龙