超市管理系统后端接口
用户管理
- 查询全部用户
1 | GET: localhost:8081/api/user |
- 根据ID查询用户
1 | GET: localhost:8081/api/user/{id} |
- 添加用户
1 | POST: localhost:8081/api/user/{请求体:application/json} |
- 更新用户
1 | PATCH: localhost:8081/api/user/{请求体:application/json} |
- 删除用户
1 | DELETE: localhost:8081/api/user/{id} |
登录/注册管理
- 登录
1 | POST: localhost:8081/api/login/{请求体:application/json} |
- 注册
1 | POST: localhost:8081/api/register/{请求体:application/json} |
角色/权限管理
- 查询用户角色
1 | GET: localhost:8081/api/user-role/{id} |
商品管理
- 查询全部商品
1 | GET: localhost:8081/api/goods |
- 根据ID查询商品
1 | GET: localhost:8081/api/goods/{id} |
- 添加商品
1 | POST: localhost:8081/api/goods/{请求体:application/json} |
- 更新商品
1 | PATCH: localhost:8081/api/goods/{请求体:application/json} |
- 添加/减少商品数量
1 | POST: localhost:8081/api/goods/{id}/{num} |
- 删除商品
1 | DELETE: localhost:8081/api/goods/{id} |
会员管理
- 查询全部会员
1 | GET: localhost:8081/api/member |
- 根据ID查询会员
1 | GET: localhost:8081/api/member/{id} |
- 添加会员
1 | POST: localhost:8081/api/member/{请求体:application/json} |
- 更新会员
1 | PATCH: localhost:8081/api/member/{请求体:application/json} |
- 删除会员
1 | DELETE: localhost:8081/api/member/{id} |
订单管理
- 查询全部订单
1 | GET: localhost:8081/api/sale |
- 根据ID查询订单
1 | GET: localhost:8081/api/sale/{id} |
- 添加订单
1 | POST: localhost:8081/api/sale/{请求体:application/json} |
- 更新订单
1 | PATCH: localhost:8081/api/sale/{请求体:application/json} |
- 删除订单
1 | DELETE: localhost:8081/api/sale/{id} |
订单商品管理
- 根据ID查询订单商品
1 | GET: localhost:8081/api/sale-goods/{id} |
- 添加订单商品
1 | POST: localhost:8081/api/sale-goods/{请求体:application/json} |
- 更新订单商品
1 | PATCH: localhost:8081/api/sale-goods/{请求体:application/json} |
- 删除订单商品
1 | DELETE: localhost:8081/api/sale-goods/{id} |
- 删除订单ID所有商品
1 | DELETE: localhost:8081/api/sale-goods/sale/{id} |
经营分析
- 暂留 (逻辑:查询每天/周/月销售额,前端根据数据生成折线图)
All articles in this blog are licensed under CC BY-NC-SA 4.0 unless stating additionally.