文档
测试

按分类获取商品

GET
/api/goods/getgoodsbycategory

请求头

参数名
类型
描述
必填
token
string
token
必填

请求参数

参数名
类型
描述
必填
shopId
long
门店ID
必填
key
string
查询的关键字
必填

响应参数

参数名
类型
描述
必填
categoryId
long
分类ID
必填
categoryName
String
分类名
必填
companyId
long
门店ID
必填
goodsVos
object
分类下所属商品
必填
id
long
商品ID
必填
companyId
long
门店ID
必填
name
String
商品名
必填
goodsImages
String
商品图片
必填
updateTime
String
更新时间
必填
createdTime
String
创建时间
必填

说明 / 示例

{ "total": 0, "code": 0, "data": [ { "categoryId": 1, "categoryName": "面条", "companyId": 1, "goodsVos": [ { "id": 1, "companyId": 1, "name": "红烧牛肉面", "goodsImages": "http://192.168.0.184:8199/a.jpg", "goodsPrice": 15.0, "stock": 100, "createdTime": "2021-05-13 16:49:25", "updateTime": "2021-05-13 16:49:31", "number": 0, "groupLabelVos": null }, { "id": 4, "companyId": 1, "name": "姜鸭面", "goodsImages": "http://192.168.0.184:8199/d.jpg", "goodsPrice": 11.8, "stock": 100, "createdTime": "2021-07-02 10:09:20", "updateTime": "2021-07-02 10:09:24", "number": 0, "groupLabelVos": null }, { "id": 5, "companyId": 1, "name": "生椒牛肉面", "goodsImages": "http://192.168.0.184:8199/e.jpg", "goodsPrice": 11.8, "stock": 100, "createdTime": "2021-07-02 10:10:06", "updateTime": "2021-07-02 10:10:09", "number": 0, "groupLabelVos": null }, { "id": 8, "companyId": 1, "name": "土豆烧牛肉", "goodsImages": "a.jpg", "goodsPrice": 38.0, "stock": null, "createdTime": "2021-08-27 10:39:51", "updateTime": "2021-08-27 10:39:51", "number": 0, "groupLabelVos": null } ] }, { "categoryId": 2, "categoryName": "热销", "companyId": 1, "goodsVos": [ { "id": 2, "companyId": 1, "name": "招牌豌杂面", "goodsImages": "http://192.168.0.184:8199/b.jpg", "goodsPrice": 13.0, "stock": 100, "createdTime": "2021-05-13 16:53:07", "updateTime": "2021-05-13 16:53:11", "number": 0, "groupLabelVos": null } ] }, { "categoryId": 3, "categoryName": "折扣", "companyId": 1, "goodsVos": [ { "id": 3, "companyId": 1, "name": "牛杂火锅面", "goodsImages": "http://192.168.0.184:8199/c.jpg", "goodsPrice": 19.0, "stock": 102, "createdTime": "2021-06-30 09:57:41", "updateTime": "2021-07-23 12:12:35", "number": 0, "groupLabelVos": null } ] }, { "categoryId": 4, "categoryName": "盖饭", "companyId": 1, "goodsVos": [ { "id": 6, "companyId": 1, "name": "青椒肉丝盖饭", "goodsImages": "http://192.168.0.184:8199/f.jpg", "goodsPrice": 18.0, "stock": 100, "createdTime": "2021-07-02 10:11:02", "updateTime": "2021-07-02 10:11:05", "number": 0, "groupLabelVos": null } ] } ], "message": "success" }