资讯分页查询
[toc]
GET 资讯分页查询
GET /localhost:9000/article/article/query
请求参数
名称 | 位置 | 类型 | 必选 | 说明 |
---|---|---|---|---|
title | query | string | 是 | 标题模糊匹配 |
type | query | string | 是 | 文章类型(1 外部文章,2本站文章) |
state | query | string | 是 | 文章状态(-1 无效,0 有效) |
beginDate | query | string | 是 | 文章发布时间区间的开始时间 |
endDate | query | string | 是 | 文章发布时间区间的结束时间 |
currentPage | query | string | 否 | 分页参数 当前页 |
pageSize | query | string | 否 | 分页参数 每页显示条数 |
> 返回示例
> 成功
{
"msg": "success",
"code": 200,
"data": {
"records": [
{
"id": 1,
"title": "叩丁狼资讯测试",
"type": 1,
"content": "<p>222222</p>\n",
"url": "1",
"state": 0,
"beginDate": "2023-01-09",
"endDate": "2023-01-29",
"releaseDate": "2023-01-11",
"updateTime": "2023-01-11 15:23:32"
},
{
"id": 2,
"title": "叩丁狼资讯测试",
"type": 2,
"content": "<p>ddddd</p>\n",
"url": "11",
"state": 0,
"beginDate": "2023-01-09",
"endDate": "2023-01-13",
"releaseDate": "2022-12-26",
"updateTime": "2023-01-11 19:06:20"
},
{
"id": 3,
"title": "叩丁狼资讯测试",
"type": 2,
"content": "<p>aaaaaaaa</p>\n",
"url": "11",
"state": 0,
"beginDate": "2023-01-10",
"endDate": "2023-01-10",
"releaseDate": "2022-12-26",
"updateTime": null
},
{
"id": 4,
"title": "叩丁狼资讯测试",
"type": 1,
"content": "<p>sss</p>\n",
"url": "2222",
"state": 0,
"beginDate": "2023-01-10",
"endDate": "2023-01-28",
"releaseDate": "2023-01-11",
"updateTime": null
},
{
"id": 5,
"title": "叩丁狼资讯测试",
"type": 1,
"content": "<p>sss</p>\n",
"url": "2222",
"state": 0,
"beginDate": "2023-01-10",
"endDate": "2023-01-28",
"releaseDate": "2023-01-11",
"updateTime": null
}
],
"total": 5,
"size": 10,
"current": 1,
"orders": [],
"optimizeCountSql": true,
"searchCount": true,
"countId": null,
"maxLimit": null,
"pages": 1
}
}
返回结果
名称 | 类型 | 说明 |
---|---|---|
id | Long | 资讯id |
title | string | 资讯标题 |
type | string | 文章类型(1 外部文章,2本站文章) |
content | string | 资讯内容 |
url | string | 外部文章链接 |
state | string | 文章状态(-1 无效,0 有效) |
beginDate | string | 生效开始时间 |
endDate | string | 生效结束时间 |
releseDate | string | 发布时间 |
updateTime | string | 修改时间 |
状态码 | 状态码含义 | 说明 | 数据模型 |
---|---|---|---|
200 | OK | 成功 | Inline |