GET /api/nutrition
pageSize=20 // 默认20, 全部非必填
pageNo=0 // 默认0, 从0开始
keyword=青少年 // 查询关键字
{
"body": {
"content": [
{
"foodCategoryDay": {
"水果类": 20,
"蔬菜类": 50,
"谷薯类": 10,
"畜肉禽类": 30
},
"foodCategoryWeek": {
"水果类": 100,
"蔬菜类": 200,
"谷薯类": 500,
"畜肉禽类": 300
},
"id": 1,
"ingredient": {
"轻体力": {
"vitamin-a": {
"min": 2,
"max": 10,
"ul": 5
}
},
"中体力": {
"vitamin-a": {
"min": 2,
"max": 10,
"ul": 5
}
}
},
"name": "青少年就餐指导",
"overflow": 0.51,
"vendors": [
1
]
}
],
"number": 0,
"size": 20,
"totalElements": 1,
"totalPages": 1
},
"code": 200,
"desc": "成功",
"success": true
}
GET /api/nutrition/select
id=1
{
"body": {
"foodCategoryDay": {
"水果类": 20,
"蔬菜类": 50,
"谷薯类": 10,
"畜肉禽类": 30
},
"foodCategoryWeek": {
"水果类": 100,
"蔬菜类": 200,
"谷薯类": 500,
"畜肉禽类": 300
},
"id": 1,
"ingredient": {
"轻体力": {
"vitamin-a": {
"min": 2,
"max": 10,
"ul": 5
}
},
"中体力": {
"vitamin-a": {
"min": 2,
"max": 10,
"ul": 5
}
}
},
"name": "青少年就餐指导",
"overflow": 0.51,
"vendors": [
1
]
},
"code": 200,
"desc": "成功",
"success": true
}
GET /api/nutrition/select
vender=1 // 非必填
keyword=青
{
"body": [
{
"foodCategoryDay": {
"水果类": 20,
"蔬菜类": 50,
"谷薯类": 10,
"畜肉禽类": 30
},
"foodCategoryWeek": {
"水果类": 100,
"蔬菜类": 200,
"谷薯类": 500,
"畜肉禽类": 300
},
"id": 1,
"ingredient": {
"轻体力": {
"vitamin-a": {
"min": 2,
"max": 10,
"ul": 5
}
},
"中体力": {
"vitamin-a": {
"min": 2,
"max": 10,
"ul": 5
}
}
},
"name": "青少年就餐指导",
"overflow": 0.51,
"vendors": [
1
]
}
],
"code": 200,
"desc": "成功",
"success": true
}
PUT /api/nutrition
Content-Type:application/x-www-form-urlencoded
name=青少年就餐指导 // 必填 名称
vendors=1,2.3 // 必填 单位列表
overflow=0.5 // 必填 溢出
{
"code": 200,
"desc": "成功",
"success": true
}
POST /api/nutrition
Content-Type:application/x-www-form-urlencoded
id=1 // 必填
name=青少年就餐指导 // 名称
vendors=1,2,3 // 单位列表
overflow=0.5 // 溢出
foodCategoryDay={"水果类": 20, "蔬菜类": 50, "谷薯类": 10, "畜肉禽类": 30}
foodCategoryWeek={"水果类": 200, "蔬菜类": 500, "谷薯类": 100, "畜肉禽类": 300}
ingredient={"中体力": {"vitamin-a": {"ul": 5, "max": 10, "min": 2}}, "轻体力": {"vitamin-a": {"ul": 5, "max": 10, "min": 2}}}
{
"code": 200,
"desc": "成功",
"success": true
}
DELETE /api/nutrition
Content-Type:application/x-www-form-urlencoded
id=1 // 必填
{
"code": 200,
"desc": "成功",
"success": true
}
PUT /api/ingredient/mark
Content-Type:application/x-www-form-urlencoded
nutrient=010101
mark=常用 // 必填, 取值: 常用/忌用
{
"code": 200,
"desc": "成功",
"success": true
}
DELETE /api/ingredient/mark
Content-Type:application/x-www-form-urlencoded
nutrient=010101
{
"code": 200,
"desc": "成功",
"success": true
}
PUT /api/ingredient/mark
Content-Type: multipart/form-data
files // 必传
{
"code": 200,
"desc": "成功",
"success": true
}