002-仿京东开发手册
1. 依赖
- 接口:
- 说明:
- 响应:
- 效果:
2. 数据库
3. 接口
3.1. 店铺分类
3.1.1. 获取所有店铺分类数据(status为正常的)
- 接口:
ShopCategoryController
http://127.0.0.1:8080/jingdong/shop_categorys
- 说明
- status为 1, 即正常的
- 响应:
{
"code": 200,
"message": "查询成功",
"data": [
{
"id": 1,
"name": "便利超市",
"imgUrl": "https://img.codertoro.top/Bucket/img/projects/jingdong/img/index/shop_category/1.png",
"status": 1,
"createTime": "2023-04-17T15:37:05.000+00:00",
"updateTime": "2025-06-27T11:50:54.000+00:00"
},
{
"id": 2,
"name": "生鲜蔬菜",
"imgUrl": "https://img.codertoro.top/Bucket/img/projects/jingdong/img/index/shop_category/2.png",
"status": 1,
"createTime": "2023-04-17T15:37:05.000+00:00",
"updateTime": "2025-06-27T11:50:54.000+00:00"
},
{
"id": 3,
"name": "品牌免运",
"imgUrl": "https://img.codertoro.top/Bucket/img/projects/jingdong/img/index/shop_category/3.png",
"status": 1,
"createTime": "2023-04-17T15:37:05.000+00:00",
"updateTime": "2025-06-27T11:50:54.000+00:00"
},
{
"id": 4,
"name": "优惠红包",
"imgUrl": "https://img.codertoro.top/Bucket/img/projects/jingdong/img/index/shop_category/4.png",
"status": 1,
"createTime": "2023-04-17T15:37:05.000+00:00",
"updateTime": "2025-06-27T11:50:54.000+00:00"
},
{
"id": 5,
"name": "水果零食",
"imgUrl": "https://img.codertoro.top/Bucket/img/projects/jingdong/img/index/shop_category/5.png",
"status": 1,
"createTime": "2023-04-17T15:37:05.000+00:00",
"updateTime": "2025-06-27T11:50:54.000+00:00"
},
{
"id": 6,
"name": "鲜花绿植",
"imgUrl": "https://img.codertoro.top/Bucket/img/projects/jingdong/img/index/shop_category/6.png",
"status": 1,
"createTime": "2023-04-17T15:37:05.000+00:00",
"updateTime": "2025-06-27T11:50:54.000+00:00"
},
{
"id": 7,
"name": "医药健康",
"imgUrl": "https://img.codertoro.top/Bucket/img/projects/jingdong/img/index/shop_category/7.png",
"status": 1,
"createTime": "2023-04-17T15:37:05.000+00:00",
"updateTime": "2025-06-27T11:50:54.000+00:00"
},
{
"id": 8,
"name": "家居时尚",
"imgUrl": "https://img.codertoro.top/Bucket/img/projects/jingdong/img/index/shop_category/8.png",
"status": 1,
"createTime": "2023-04-17T15:37:05.000+00:00",
"updateTime": "2025-06-27T11:50:54.000+00:00"
},
{
"id": 9,
"name": "签到",
"imgUrl": "https://img.codertoro.top/Bucket/img/projects/jingdong/img/index/shop_category/9.png",
"status": 1,
"createTime": "2023-04-17T15:37:05.000+00:00",
"updateTime": "2025-06-27T11:50:54.000+00:00"
},
{
"id": 10,
"name": "烘焙蛋糕",
"imgUrl": "https://img.codertoro.top/Bucket/img/projects/jingdong/img/index/shop_category/10.png",
"status": 1,
"createTime": "2023-04-17T15:37:05.000+00:00",
"updateTime": "2025-06-27T11:50:54.000+00:00"
}
]
}
- 效果:
3.2. 店铺设计
3.2.1. 查询热门店铺列表(分页)
- 接口:
ShopController
http://127.0.0.1:8080/jingdong/shop/hotShops
- 说明:
- 形参:
- page – 当前页码,默认为 1
- size – 每页条数,默认为 10
- 返回值:
- 包含热门店铺数据的分页结果
- 形参:
- 响应:
{
"code": 200,
"message": "查询成功",
"data": {
"records": [
{
"id": 1,
"cateId": 1,
"title": "汉码未来",
"sales": 2000,
"expresslimit": 10,
"expressprice": 30.00,
"description": "VIP尊享满89元减4元运费券(每月3张)",
"imgurl": "http://webapi.hanmaweilai.com/public/static/images/near.png",
"state": 1,
"status": 1
},
{
"id": 2,
"cateId": 1,
"title": "华夏之家",
"sales": 1000,
"expresslimit": 0,
"expressprice": 10.00,
"description": "VIP尊享满89元减4元运费券(每月3张)",
"imgurl": "http://webapi.hanmaweilai.com/public/static/images/新疆.png",
"state": 1,
"status": 1
},
{
"id": 3,
"cateId": 1,
"title": "极致生鲜",
"sales": 2000,
"expresslimit": 15,
"expressprice": 30.00,
"description": "VIP尊享满89元减4元运费券(每月3张)",
"imgurl": "http://webapi.hanmaweilai.com/public/static/images/fruit.png",
"state": 1,
"status": 1
},
{
"id": 4,
"cateId": 1,
"title": "美好时光",
"sales": 2000,
"expresslimit": 20,
"expressprice": 60.00,
"description": "VIP尊享满89元减4元运费券(每月3张)",
"imgurl": "http://webapi.hanmaweilai.com/public/static/images/汉码烘焙.png",
"state": 1,
"status": 1
},
{
"id": 5,
"cateId": 1,
"title": "转角超市",
"sales": 2000,
"expresslimit": 30,
"expressprice": 90.00,
"description": "VIP尊享满89元减4元运费券(每月3张)",
"imgurl": "http://webapi.hanmaweilai.com/public/static/images/鲜花初见.png",
"state": 1,
"status": 1
},
{
"id": 6,
"cateId": 1,
"title": "汉码超市",
"sales": 2000,
"expresslimit": 25,
"expressprice": 75.00,
"description": "VIP尊享满89元减4元运费券(每月3张)",
"imgurl": "http://webapi.hanmaweilai.com/public/static/images/near.png",
"state": 1,
"status": 1
},
{
"id": 7,
"cateId": 1,
"title": "瓜言果语",
"sales": 2000,
"expresslimit": 5,
"expressprice": 15.00,
"description": "VIP尊享满89元减4元运费券(每月3张)",
"imgurl": "http://webapi.hanmaweilai.com/public/static/images/瓜言果语.png",
"state": 1,
"status": 1
},
{
"id": 8,
"cateId": 1,
"title": "尚花弄堂",
"sales": 2000,
"expresslimit": 8,
"expressprice": 24.00,
"description": "VIP尊享满89元减4元运费券(每月3张)",
"imgurl": "http://webapi.hanmaweilai.com/public/static/images/尚花印.png",
"state": 1,
"status": 1
},
{
"id": 9,
"cateId": 1,
"title": "天天水果",
"sales": 2000,
"expresslimit": 0,
"expressprice": 30.00,
"description": "VIP尊享满89元减4元运费券(每月3张)",
"imgurl": "http://webapi.hanmaweilai.com/public/static/images/养生超市.png",
"state": 1,
"status": 1
},
{
"id": 10,
"cateId": 1,
"title": "汉码食品",
"sales": 2000,
"expresslimit": 5,
"expressprice": 15.00,
"description": "VIP尊享满89元减4元运费券(每月3张)",
"imgurl": "http://webapi.hanmaweilai.com/public/static/images/near.png",
"state": 1,
"status": 1
}
],
"total": 101,
"size": 10,
"current": 1,
"pages": 11
}
}
- 效果:待完工
3.2.2. 根据店铺 ID 查询店铺信息
- 接口:
ShopController
http://127.0.0.1:8080/jingdong/shop/{shopId}
- 说明:
- 形参:
- id – 店铺主键 ID
- 返回值:
- 指定 ID 对应的店铺信息
- 形参:
- 响应:
{
"code": 200,
"message": "查询成功",
"data": {
"id": 165,
"cateId": 7,
"title": "家康大药房",
"sales": 1500,
"expresslimit": 10,
"expressprice": 5.00,
"description": "用药无忧 守护健康",
"imgurl": null,
"state": 1,
"status": 1
}
}
- 效果:待完工