食物分页查询
联调中
GET
http://food.atanycosts.cn/food/page
最后修改时间:2023-02-11 12:14:48
责任人:Atanycosts
请求参数
Query 参数
page
string
必需
示例值:
1
pageSize
string
必需
示例值:
15
foodName
string
可选
示例值:
土豆
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request GET 'http://food.atanycosts.cn/food/page?page=1&pageSize=15&foodName=土豆'
返回响应
🟢200成功
application/json
Body
code
integer
必需
msg
string
必需
data
object
必需
records
array [object {17}]
必需
total
integer
必需
size
integer
必需
current
integer
必需
orders
array[string]
必需
optimizeCountSql
boolean
必需
hitCount
boolean
必需
countId
null
必需
maxLimit
null
必需
searchCount
boolean
必需
pages
integer
必需
map
object
必需
示例
{
"code": 1,
"msg": "成功",
"data": {
"records": [
{
"id": "1625757412046061570",
"foodName": "土豆",
"foodSort": 1,
"energy": 0,
"carbs": 0,
"protein": 0,
"dietaryFiber": 0,
"fat": 0,
"cholesterol": 0,
"vitamin": 0,
"traceElement": 0,
"other": 0,
"createTime": "2023-02-15 15:22:26",
"updateTime": "2023-02-15 15:22:26",
"isDelete": 0,
"vitamins": [
{
"sort": 1,
"id": "1625757412046061570",
"vitaminId": 0,
"vitaminA": 1,
"vitaminB1": 1,
"vitaminB2": 1,
"vitaminB12": 1,
"vitaminC": 1,
"vitaminD": 1,
"vitaminE": 1,
"vitaminF": 1,
"niacin": 1,
"folicacid": 1,
"createTime": "2023-03-06 23:21:29",
"updateTime": "2023-03-06 23:21:37",
"isDelete": 1
}
],
"traces": [
{
"sort": 1,
"id": "1625757412046061570",
"iron": 1,
"iodine": 11,
"potassium": 1,
"magnesium": 1,
"copper": 1,
"phosphorus": 1,
"zinc": 1,
"selenium": 1,
"folate": 1,
"calcium": 1,
"cobalt": 1,
"sodium": 1,
"sulfur": 1,
"silicon": 1,
"createTime": "2023-03-07 17:16:48",
"updateTime": "2023-03-07 17:16:54",
"isDelete": 1
}
]
},
{
"id": "2",
"foodName": "土豆",
"foodSort": 1,
"energy": 0,
"carbs": 0,
"protein": 0,
"dietaryFiber": 0,
"fat": 0,
"cholesterol": 0,
"vitamin": 0,
"traceElement": 0,
"other": 0,
"createTime": "2023-02-11 20:07:07",
"updateTime": "2023-02-11 20:07:07",
"isDelete": 0,
"vitamins": [],
"traces": []
}
],
"total": 2,
"size": 15,
"current": 1,
"orders": [],
"optimizeCountSql": true,
"hitCount": false,
"countId": null,
"maxLimit": null,
"searchCount": true,
"pages": 1
},
"map": {}
}