根据UserId查询消息(API名称:findPagedMessageListByUserId)
功能介绍
根据UserId查询消息。
相关接口
|
接口名称 |
调用说明 |
|---|---|
|
调用该接口获取到Token,再调用其他接口时,需要在请求消息头中添加“Authorization”,其值即为Token。 |
URL
|
请求方式 |
HTTPS地址 |
服务架构 |
消息体类型 |
|---|---|---|---|
|
POST |
https://isdp+域名/openapi/v1/message/findPagedMessageListByUserId |
OpenAPI |
application/json |
请求头
|
KEY |
VALUE |
是否必填 |
描述 |
|---|---|---|---|
|
Content-Type |
application/json |
是 |
无 |
|
Authorization |
bearer ${access_token} |
是 |
bearer +“ ”+5.2.1中获取的access_token的值 |
请求参数
|
参数 |
类型 |
是否必填 |
描述 |
|---|---|---|---|
|
userId |
Long |
是 |
用户ID |
|
msgTitle |
String |
否 |
消息标题 |
|
start |
int |
否 |
记录下标,不传默认0 |
|
count |
Int |
否 |
记录数,不传默认200,不能超200 |
响应参数
|
参数 |
类型 |
描述 |
|---|---|---|
|
status |
String |
状态 success/failed |
|
msg |
String |
异常信息,异常时提示 |
|
data |
Object |
返回数据,详见data对象说明 |
|
failed |
boolean |
true/false |
|
success |
boolean |
true/false |
Data对象
|
参数 |
类型 |
描述 |
|---|---|---|
|
msgId |
Long |
消息ID |
|
msgTitle |
String |
消息标题 |
|
extParam |
String |
扩展参数 |
|
msgType |
int |
消息类型 0普通消息1公告 |
|
publishTime |
String |
发布时间 |
|
msgDescription |
String |
消息描述 |
|
subcategory |
String |
二级消息分类 |
|
extended1 |
String |
扩展字段1 |
|
Extended2 |
String |
扩展字段2 |
|
Extended3 |
String |
扩展字段3 |
|
Extended4 |
String |
扩展字段4 |
|
Extended5 |
String |
扩展字段5 |
|
Extended6 |
String |
扩展字段6 |
|
readStatus |
Int |
消息是否已读 0未读1已读 |
|
noticeId |
Long |
公告ID |
请求示例
{
"userId": -1,
"msgTitle": null,
"start": 0,
"count": 10
}
响应示例
{
"status": "success",
"msg": null,
"data": {
"start": 0,
"count": 10,
"data": [
{
"msgId": 1951009,
"msgTitle": "待办问题",
"extParam": null,
"msgType": 9,
"publishTime": "2022-03-11T10:24:49.000+00:00",
"msgDescription": "你有一个新的待办问题【发的刚发的】",
"subcategory": "09_02",
"extended1": "219884",
"extended2": "Issue20220311184389",
"extended3": null,
"extended4": null,
"extended5": "/one/#/qc/question/process?issueId=219884&type=2&key=issueId&child=204",
"extended6": null,
"readStatus": 1,
"noticeId": null
}
],
"totalCount": 1,
"unReadCount": 0
},
"failed": false,
"success": true
}