甄选API接口文档
大约 8 分钟
甄选API接口文档
[TOC]
商品列表管理
分页查询
接口地址:/api/product/{page}/{limit}
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:*/*
接口描述:
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| page | 当前页码 | path | true | integer(int32) | |
| limit | 每页记录数 | path | true | integer(int32) | |
| productSkuDto | 商品列表搜索条件实体类 | query | true | ProductSkuDto | ProductSkuDto |
| keyword | 关键字 | false | string | ||
| brandId | 品牌id | false | integer(int64) | ||
| category1Id | 一级分类id | false | integer(int64) | ||
| category2Id | 二级分类id | false | integer(int64) | ||
| category3Id | 三级分类id | false | integer(int64) | ||
| order | 排序(销量:1 价格升序:2 价格降序:3) | false | integer(int32) |
响应状态:
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | Result PageInfo ProductSku |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| code | 业务状态码 | integer(int32) | integer(int32) |
| message | 响应消息 | string | |
| data | PageInfoProductSku | PageInfoProductSku | |
| total | integer(int64) | ||
| list | ProductSku | array | ProductSku |
| id | 唯一标识 | integer | |
| createTime | 创建时间 | string | |
| updateTime | 修改时间 | string | |
| isDeleted | 是否删除 | integer | |
| skuCode | 商品编号 | string | |
| skuName | skuName | string | |
| productId | 商品ID | integer | |
| thumbImg | 缩略图路径 | string | |
| salePrice | 售价 | number | |
| marketPrice | 市场价 | number | |
| costPrice | 成本价 | number | |
| stockNum | 库存数 | integer | |
| saleNum | 销量 | integer | |
| skuSpec | sku规格信息json | string | |
| weight | 重量 | string | |
| volume | 体积 | string | |
| status | 线上状态:0-初始值,1-上架,-1-自主下架 | integer | |
| pageNum | integer(int32) | ||
| pageSize | integer(int32) | ||
| size | integer(int32) | ||
| startRow | integer(int64) | ||
| endRow | integer(int64) | ||
| pages | integer(int32) | ||
| prePage | integer(int32) | ||
| nextPage | integer(int32) | ||
| isFirstPage | boolean | ||
| isLastPage | boolean | ||
| hasPreviousPage | boolean | ||
| hasNextPage | boolean | ||
| navigatePages | integer(int32) | ||
| navigatepageNums | array | integer(int32) | |
| navigateFirstPage | integer(int32) | ||
| navigateLastPage | integer(int32) |
响应示例:
{
"code": 0,
"message": "",
"data": {
"total": 0,
"list": [
{
"id": 0,
"createTime": "",
"updateTime": "",
"isDeleted": 0,
"skuCode": "",
"skuName": "",
"productId": 0,
"thumbImg": "",
"salePrice": 0,
"marketPrice": 0,
"costPrice": 0,
"stockNum": 0,
"saleNum": 0,
"skuSpec": "",
"weight": "",
"volume": "",
"status": 0
}
],
"pageNum": 0,
"pageSize": 0,
"size": 0,
"startRow": 0,
"endRow": 0,
"pages": 0,
"prePage": 0,
"nextPage": 0,
"isFirstPage": true,
"isLastPage": true,
"hasPreviousPage": true,
"hasNextPage": true,
"navigatePages": 0,
"navigatepageNums": [],
"navigateFirstPage": 0,
"navigateLastPage": 0
}
}
商品详情
接口地址:/api/product/item/{skuId}
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:*/*
接口描述:
请求参数:
| 参数名称 | 参数说明 | 请求类型 | 是否必须 | 数据类型 | schema |
|---|---|---|---|---|---|
| skuId | 商品skuId | path | true | integer(int64) |
响应状态:
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | Result ProductItemVo |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| code | 业务状态码 | integer(int32) | integer(int32) |
| message | 响应消息 | string | |
| data | ProductItemVo | ProductItemVo | |
| productSku | ProductSku | ProductSku | ProductSku |
| id | 唯一标识 | integer | |
| createTime | 创建时间 | string | |
| updateTime | 修改时间 | string | |
| isDeleted | 是否删除 | integer | |
| skuCode | 商品编号 | string | |
| skuName | skuName | string | |
| productId | 商品ID | integer | |
| thumbImg | 缩略图路径 | string | |
| salePrice | 售价 | number | |
| marketPrice | 市场价 | number | |
| costPrice | 成本价 | number | |
| stockNum | 库存数 | integer | |
| saleNum | 销量 | integer | |
| skuSpec | sku规格信息json | string | |
| weight | 重量 | string | |
| volume | 体积 | string | |
| status | 线上状态:0-初始值,1-上架,-1-自主下架 | integer | |
| product | 商品实体类 | Product | Product |
| id | 唯一标识 | integer | |
| createTime | 创建时间 | string | |
| updateTime | 修改时间 | string | |
| isDeleted | 是否删除 | integer | |
| name | 商品名称 | string | |
| brandId | 品牌id | integer | |
| category1Id | 一级分类id | integer | |
| category2Id | 二级分类id | integer | |
| category3Id | 三级分类id | integer | |
| unitName | 计量单位 | string | |
| sliderUrls | 轮播图url | string | |
| specValue | 商品规格值json串 | string | |
| status | 线上状态:0-初始值,1-上架,-1-自主下架 | integer | |
| auditStatus | 审核状态 | integer | |
| auditMessage | 审核信息 | string | |
| brandName | 品牌名称 | string | |
| category1Name | 一级分类名称 | string | |
| category2Name | 二级分类名称 | string | |
| category3Name | 三级分类名称 | string | |
| productSkuList | ProductSku | array | ProductSku |
| id | 唯一标识 | integer | |
| createTime | 创建时间 | string | |
| updateTime | 修改时间 | string | |
| isDeleted | 是否删除 | integer | |
| skuCode | 商品编号 | string | |
| skuName | skuName | string | |
| productId | 商品ID | integer | |
| thumbImg | 缩略图路径 | string | |
| salePrice | 售价 | number | |
| marketPrice | 市场价 | number | |
| costPrice | 成本价 | number | |
| stockNum | 库存数 | integer | |
| saleNum | 销量 | integer | |
| skuSpec | sku规格信息json | string | |
| weight | 重量 | string | |
| volume | 体积 | string | |
| status | 线上状态:0-初始值,1-上架,-1-自主下架 | integer | |
| detailsImageUrls | 图片详情列表 | string | |
| sliderUrlList | 商品轮播图列表 | array | string |
| detailsImageUrlList | 商品详情图片列表 | array | string |
| specValueList | 商品规格信息 | array | object |
| skuSpecValueMap | key就是sku商品规格,value是skuId | object |
响应示例:
{
"code": 0,
"message": "",
"data": {
"productSku": {
"id": 0,
"createTime": "",
"updateTime": "",
"isDeleted": 0,
"skuCode": "",
"skuName": "",
"productId": 0,
"thumbImg": "",
"salePrice": 0,
"marketPrice": 0,
"costPrice": 0,
"stockNum": 0,
"saleNum": 0,
"skuSpec": "",
"weight": "",
"volume": "",
"status": 0
},
"product": {
"id": 0,
"createTime": "",
"updateTime": "",
"isDeleted": 0,
"name": "",
"brandId": 0,
"category1Id": 0,
"category2Id": 0,
"category3Id": 0,
"unitName": "",
"sliderUrls": "",
"specValue": "",
"status": 0,
"auditStatus": 0,
"auditMessage": "",
"brandName": "",
"category1Name": "",
"category2Name": "",
"category3Name": "",
"productSkuList": [
{
"id": 0,
"createTime": "",
"updateTime": "",
"isDeleted": 0,
"skuCode": "",
"skuName": "",
"productId": 0,
"thumbImg": "",
"salePrice": 0,
"marketPrice": 0,
"costPrice": 0,
"stockNum": 0,
"saleNum": 0,
"skuSpec": "",
"weight": "",
"volume": "",
"status": 0
}
],
"detailsImageUrls": ""
},
"sliderUrlList": [],
"detailsImageUrlList": [],
"specValueList": [],
"skuSpecValueMap": {}
}
}
首页接口管理
获取首页数据
接口地址:/api/product/index
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:*/*
接口描述:
请求参数:
暂无
响应状态:
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | ResultIndexVo |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| code | 业务状态码 | integer(int32) | integer(int32) |
| message | 响应消息 | string | |
| data | IndexVo | IndexVo | |
| categoryList | 分类实体类 | array | Category |
| id | 唯一标识 | integer | |
| createTime | 创建时间 | string | |
| updateTime | 修改时间 | string | |
| isDeleted | 是否删除 | integer | |
| name | 分类名称 | string | |
| imageUrl | 分类图片url | string | |
| parentId | 父节点id | integer | |
| status | 分类状态: 是否显示[0-不显示,1显示] | integer | |
| orderNum | 排序字段 | integer | |
| hasChildren | 是否存在子节点 | boolean | |
| children | 子节点List集合 | array | Category |
| productSkuList | ProductSku | array | ProductSku |
| id | 唯一标识 | integer | |
| createTime | 创建时间 | string | |
| updateTime | 修改时间 | string | |
| isDeleted | 是否删除 | integer | |
| skuCode | 商品编号 | string | |
| skuName | skuName | string | |
| productId | 商品ID | integer | |
| thumbImg | 缩略图路径 | string | |
| salePrice | 售价 | number | |
| marketPrice | 市场价 | number | |
| costPrice | 成本价 | number | |
| stockNum | 库存数 | integer | |
| saleNum | 销量 | integer | |
| skuSpec | sku规格信息json | string | |
| weight | 重量 | string | |
| volume | 体积 | string | |
| status | 线上状态:0-初始值,1-上架,-1-自主下架 | integer |
响应示例:
{
"code": 0,
"message": "",
"data": {
"categoryList": [
{
"id": 0,
"createTime": "",
"updateTime": "",
"isDeleted": 0,
"name": "",
"imageUrl": "",
"parentId": 0,
"status": 0,
"orderNum": 0,
"hasChildren": true,
"children": [
{
"id": 0,
"createTime": "",
"updateTime": "",
"isDeleted": 0,
"name": "",
"imageUrl": "",
"parentId": 0,
"status": 0,
"orderNum": 0,
"hasChildren": true,
"children": [
{}
]
}
]
}
],
"productSkuList": [
{
"id": 0,
"createTime": "",
"updateTime": "",
"isDeleted": 0,
"skuCode": "",
"skuName": "",
"productId": 0,
"thumbImg": "",
"salePrice": 0,
"marketPrice": 0,
"costPrice": 0,
"stockNum": 0,
"saleNum": 0,
"skuSpec": "",
"weight": "",
"volume": "",
"status": 0
}
]
}
}
分类接口管理
获取分类树形数据
接口地址:/api/product/category/findCategoryTree
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:*/*
接口描述:
请求参数:
暂无
响应状态:
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | ResultListCategory |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| code | 业务状态码 | integer(int32) | integer(int32) |
| message | 响应消息 | string | |
| data | 业务数据 | array | Category |
| id | 唯一标识 | integer(int64) | |
| createTime | 创建时间 | string(date-time) | |
| updateTime | 修改时间 | string(date-time) | |
| isDeleted | 是否删除 | integer(int32) | |
| name | 分类名称 | string | |
| imageUrl | 分类图片url | string | |
| parentId | 父节点id | integer(int64) | |
| status | 分类状态: 是否显示[0-不显示,1显示] | integer(int32) | |
| orderNum | 排序字段 | integer(int32) | |
| hasChildren | 是否存在子节点 | boolean | |
| children | 子节点List集合 | array | Category |
响应示例:
{
"code": 0,
"message": "",
"data": [
{
"id": 0,
"createTime": "",
"updateTime": "",
"isDeleted": 0,
"name": "",
"imageUrl": "",
"parentId": 0,
"status": 0,
"orderNum": 0,
"hasChildren": true,
"children": [
{
"id": 0,
"createTime": "",
"updateTime": "",
"isDeleted": 0,
"name": "",
"imageUrl": "",
"parentId": 0,
"status": 0,
"orderNum": 0,
"hasChildren": true,
"children": [
{}
]
}
]
}
]
}
品牌管理
获取全部品牌
接口地址:/api/product/brand/findAll
请求方式:GET
请求数据类型:application/x-www-form-urlencoded
响应数据类型:*/*
接口描述:
请求参数:
暂无
响应状态:
| 状态码 | 说明 | schema |
|---|---|---|
| 200 | OK | Result List Brand |
响应参数:
| 参数名称 | 参数说明 | 类型 | schema |
|---|---|---|---|
| code | 业务状态码 | integer(int32) | integer(int32) |
| message | 响应消息 | string | |
| data | 业务数据 | array | Brand |
| id | 唯一标识 | integer(int64) | |
| createTime | 创建时间 | string(date-time) | |
| updateTime | 修改时间 | string(date-time) | |
| isDeleted | 是否删除 | integer(int32) | |
| name | 品牌名称 | string | |
| logo | 品牌logo | string |
响应示例:
{
"code": 0,
"message": "",
"data": [
{
"id": 0,
"createTime": "",
"updateTime": "",
"isDeleted": 0,
"name": "",
"logo": ""
}
]
}