功能说明:获取新闻列表
请求方式:POST(HTTPS)
请求地址:https://qwif.do1.com.cn/qwcgi/api/news/ajaxDynamicList.do?token=token&corpId=corpId
参数:data
{
"currentPage":1,
"pageSize":5
}
| 参数 | 类型 | 说明 | 是否必需 |
|---|---|---|---|
| token | string | 用于验证 | 是 |
| corpId | string | 公司唯一标识 | 是 |
| dynamicTypeId | string | 新闻类型id | 否 |
| currentPage | number | 查询新闻的分页页码 | 是 |
| pageSize | number | 查询新闻的分页大小 | 是 |
DynamicListParamVO paramVO = new DynamicListParamVO();
//新闻类型id,可传空
paramVO.setDynamicTypeId("");
//查询新闻的页码
paramVO.setCurrentPage(1);
//查询新闻的分页大小
paramVO.setPageSize(10);
NewsApi newsApi = QwSdkUtil.getInter(NewsApi.class);
// 调用接口
DynamicPager resultVO = newsApi.ajaxDynamicList(QwSdkUtil.getCacheToken(), paramVO);
// 打印输出结果
System.out.println(JSONUtil.stringify(resultVO));
{
"currPage":1,
"maxPage":297,
"pageData":
[
{
"commentCount":1,
"coverImage":"/upload/img/b17efb43292e4cc9ac5d0b46bce059c4/20190322/e7638b9d359e42efb9decea83b1b5ef9.jpeg",
"createTime":"2019-03-22 12:00:12",
"creator":"cecd811d0e5dff59e489bb3d1c4d9286",
"dynamicInfoId":"30a3e9b2-285d-4f52-87b5-ca0781a039b3",
"dynamicType":"新闻类型名称",
"dynamicTypeId":"6c8a50c05c2847379e11ac5de69e9862",
"headPic":"http://wx.qlogo.cn/mmhead/Q3auHgzwzM7FLNOZTUQSJBDVEzNbnCtIN8mqAcavPy0DZc9XwIoqXw/0",
"isPassReview":1,
"isRedpack":1,
"isSecret":"1",
"isTiming":"1",
"isTop":17,
"lastEditTime":"2019-03-26 17:26:00",
"personName":"新闻创建人",
"praise":1,
"publishTime":"2019-03-22 12:00:12",
"sendType":0,
"status":"发布",
"summary":"新闻摘要内容示意",
"title":"新闻标题示意",
"validityTime":"2021-03-22 12:00:12",
"viewCount":1
},
{
"commentCount":3,
"coverImage":"/upload/img/b17efb43292e4cc9ac5d0b46bce059c4/20180813/d8b3ccea48a7497b8561f35c9a8c9a91.jpeg",
"createTime":"2018-08-13 15:29:48",
"creator":"cecd811d0e5dff59e489bb3d1c4d9286",
"departmentId":"e19cef9be51c99dab4e872ee070dd4cc",
"departmentName":"新闻创建人部门名称",
"dynamicInfoId":"96b015128a804ebba63abe4621bb61c3",
"dynamicType":"新闻类型名称",
"dynamicTypeId":"357d6d49a67040208eb91509b47a402a",
"headPic":"http://wx.qlogo.cn/mmhead/Q3auHgzwzM7FLNOZTUQSJBDVEzNbnCtIN8mqAcavPy0DZc9XwIoqXw/0",
"isPassReview":0,
"isRedpack":0,
"isSecret":"0",
"isTiming":"0",
"isTop":7,
"lastEditTime":"2018-12-13 12:40:36",
"personName":"新闻创建人",
"praise":1,
"publishTime":"2018-12-13 12:36:09",
"sendType":0,
"status":"发布",
"summary":"新闻摘要内容示意",
"title":"新闻标题示意",
"validityTime":"2020-08-13 15:30:58",
"viewCount":17,
"wxUserId":"happen"
}
],
"totalRows":2970
}
data参数说明
| 参数 | 类型 | 说明 |
|---|---|---|
| currPage | number | 当前页码 |
| maxPage | number | 最大页码 |
| pageData | array | 新闻列表 |
| totalRows | number | 总行数 |
pageData参数说明
| 参数 | 类型 | 说明 |
|---|---|---|
| commentCount | number | 评论数 |
| coverImage | string | 封面图片 |
| createTime | string | 创建时间yyyy-MM-dd HH:mm:ss |
| creator | string | 创建人id |
| departmentId | string | 创建人部门id |
| departmentName | string | 创建人部门名 |
| dynamicInfoId | string | 新闻id |
| dynamicType | string | 新闻类型名 |
| dynamicTypeId | string | 新闻类型id |
| headPic | string | 创建人头像 |
| isPassReview | number | 审核结果:0-通过,1-待审核,2-不通过 |
| isRedpack | number | 是否有红包:0-否,1-是 |
| isSecret | string | 是否保密:0-否,1-是 |
| isTiming | string | 是否开启定时:0-否,1-是 |
| isTop | number | 置顶号:null或0-不置顶,大于0-置顶 |
| lastEditTime | string | 上一次编辑时间yyyy-MM-dd HH:mm |
| personName | string | 创建人名字 |
| praise | number | 点赞数 |
| publishTime | string | 发布时间yyyy-MM-dd HH:mm |
| sendType | number | 发送类型:0-默认,1-生日祝福,2-周年祝福,5-通过api发送 |
| status | string | 状态:发布,测试,草稿 |
| summary | string | 纪要内容 |
| title | string | 新闻标题 |
| validityTime | string | 新闻有效时间yyyy-MM-dd |
| viewCount | number | 查看次数 |
| wxUserId | string | 创建人微信id |