查询商品分类列表
该接口用于查询商品分类信息,支持分页查询,返回符合条件的商品分类列表及总数。
http://{ip}:{port}/app/productCategory.queryProductCategory
GET
参数名称 | 必填 | 类型 | 描述 |
---|---|---|---|
Authorization | 是 | String | 用户认证token,通过登录接口获取 |
app-id | 是 | String | 应用ID,系统分配 |
transaction-id | 是 | String | 请求流水号,格式:1000000000+YYYYMMDDhhmmss+6位序列 |
sign | 是 | String | 请求签名 |
req-time | 是 | String | 请求时间,格式:YYYYMMDDhhmmss |
参数名称 | 必填 | 类型 | 描述 |
---|---|---|---|
page | 否 | Integer | 当前页码(默认1) |
row | 否 | Integer | 每页记录数(默认10) |
storeId | 是 | String | 店铺ID(自动从上下文中获取) |
categoryName | 否 | String | 分类名称(模糊查询) |
parentCategoryId | 否 | String | 父分类ID |
statusCd | 否 | String | 分类状态(如:0-有效,1-无效) |
参数名称 | 类型 | 描述 |
---|---|---|
code | String | 返回码,0-成功,非0-失败 |
msg | String | 返回信息 |
data | Object | 返回数据 |
data.total | Integer | 总记录数 |
data.records | List<ProductCategoryDto> | 商品分类列表 |
字段名 | 类型 | 描述 |
---|---|---|
categoryId | String | 分类ID |
categoryName | String | 分类名称 |
parentCategoryId | String | 父分类ID |
storeId | String | 店铺ID |
statusCd | String | 状态(0-有效,1-无效) |
sortOrder | Integer | 排序权重 |
icon | String | 分类图标URL |
请求URL
GET http://127.0.0.1:8080/app/productCategory.queryProductCategory?page=1&row=10&categoryName=食品
请求头
{
"Authorization": "Bearer xxxxxx",
"app-id": "mall-goods",
"transaction-id": "100000000020231001120000000001",
"sign": "xxxxxx",
"req-time": "20231001120000"
}
成功响应
{
"code": "0",
"msg": "成功",
"data": {
"total": 5,
"records": [
{
"categoryId": "1001",
"categoryName": "食品",
"parentCategoryId": "0",
"storeId": "8001",
"statusCd": "0",
"sortOrder": 1,
"icon": "http://xxx.com/food.png"
},
{
"categoryId": "1002",
"categoryName": "饮料",
"parentCategoryId": "0",
"storeId": "8001",
"statusCd": "0",
"sortOrder": 2,
"icon": "http://xxx.com/drink.png"
}
]
}
}
失败响应
{
"code": "1001",
"msg": "店铺ID不能为空",
"data": null
}
IProductCategoryInnerServiceSMO
查询符合条件的分类列表及总数。 ResultVo
格式返回,包含分页信息和分类数据。storeId
会自动从请求上下文中获取。 sortOrder
升序排序。