You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
108 lines
1.6 KiB
108 lines
1.6 KiB
2 years ago
|
# 1. 查询食谱发布列表
|
||
|
|
||
|
|
||
|
> GET /api/menu/release
|
||
|
|
||
|
### 输入:
|
||
|
```text
|
||
|
pageSize=20 // 默认20, 全部非必填
|
||
|
pageNo=0 // 默认0, 从0开始
|
||
|
name=番茄鸡蛋汤 // 根据名称查
|
||
|
vender=1 // 根据单位查
|
||
|
startTime=2023-03-01 // 根据时间段查
|
||
|
endTime=2024-03-01
|
||
|
```
|
||
|
|
||
|
### 输出:
|
||
|
~~~json
|
||
|
{
|
||
|
"body": {
|
||
|
"content": [
|
||
|
{
|
||
|
"created": 1694014254000,
|
||
|
"crows": [
|
||
|
"轻体力",
|
||
|
"重体力"
|
||
|
],
|
||
|
"day": 1,
|
||
|
"id": 1,
|
||
|
"meals": [
|
||
|
"早餐",
|
||
|
"午餐",
|
||
|
"晚餐"
|
||
|
],
|
||
|
"modify": 1695404897000,
|
||
|
"month": [
|
||
|
1,
|
||
|
2,
|
||
|
3,
|
||
|
4,
|
||
|
5,
|
||
|
6,
|
||
|
7,
|
||
|
8,
|
||
|
9
|
||
|
],
|
||
|
"name": "23年度43周食谱",
|
||
|
"nutrient": 1,
|
||
|
"operate": "system",
|
||
|
"scale": {
|
||
|
"轻体力": 0,
|
||
|
"重体力": 0
|
||
|
},
|
||
|
"status": "发布",
|
||
|
"vender": 1
|
||
|
}
|
||
|
],
|
||
|
"number": 0,
|
||
|
"size": 20,
|
||
|
"totalElements": 1,
|
||
|
"totalPages": 1
|
||
|
},
|
||
|
"code": 200,
|
||
|
"desc": "成功",
|
||
|
"success": true
|
||
|
}
|
||
|
~~~
|
||
|
|
||
|
# 2. 发布
|
||
|
|
||
|
|
||
|
> PUT /api/menu/release
|
||
|
|
||
|
### 输入:
|
||
|
```text
|
||
|
id=1 // 食谱ID
|
||
|
scale={"重体力":10, "轻体力":20} // 人群分布
|
||
|
startTime=2023-03-01 // 发布时间段
|
||
|
endTime=2024-03-01
|
||
|
```
|
||
|
|
||
|
### 输出:
|
||
|
~~~json
|
||
|
{
|
||
|
"code": 200,
|
||
|
"desc": "成功",
|
||
|
"success": true
|
||
|
}
|
||
|
~~~
|
||
|
|
||
|
|
||
|
# 3. 取消发布
|
||
|
|
||
|
|
||
|
> DELETE /api/menu/release
|
||
|
|
||
|
### 输入:
|
||
|
```text
|
||
|
id=1 // 食谱ID
|
||
|
```
|
||
|
|
||
|
### 输出:
|
||
|
~~~json
|
||
|
{
|
||
|
"code": 200,
|
||
|
"desc": "成功",
|
||
|
"success": true
|
||
|
}
|
||
|
~~~
|