@gzm1997
2018-06-08T13:26:16.000000Z
字数 1166
阅读 809
系统分析与设计
http://149.28.53.135/api/order/{id}
例如
返回值
{
"id": 1,
"name": "pork",
"picture": "https://demo.pork.png",
"price": 53,
"description": "this is a pork",
"rating": 0.8,
"amount": 100,
"likes": 0,
"tag_id": 1,
"sales_permonth": 136
}
返回值
{
"result": [
{
"id": 1,
"name": "pork",
"picture": "https://demo.pork.png",
"price": 53,
"description": "this is a pork",
"rating": 0.8,
"amount": 100,
"likes": 0,
"tag_id": 1,
"sales_permonth": 136
},
{
"id": 2,
"name": "fish",
"picture": "https://demo.fish.png",
"price": 32,
"description": "this is a fish",
"rating": 0.4,
"amount": 10,
"likes": 0,
"tag_id": 1,
"sales_permonth": 323
}
]
}
http://149.28.53.135/api/order/{id}
例如
返回值
{
"isPaid": true,
"id": 1,
"reserve_datetime": "2018-06-08 04:58:51",
"pay_datetime": "None",
"table_num": 12,
"food_list": [
{
"id": 2,
"name": "fish",
"count": 2,
"price": 32
},
{
"id": 1,
"name": "pork",
"count": 13,
"price": 53
}
],
"total": 34
}
表单形如
table:5
list:[{'id': '1', 'name': 'pork', 'count': 123, 'price': 20}, {'id': '2', 'name': 'fish', 'count': 321, 'price': 23}]
返回值 返回值的reservation_id即为新生成的订单单号
{
"reservation_id": 3
}
使用postman进行测试生成订单api