主题
查询消息中心左侧应用列表 3.6.1.SP2+
查询消息中心左侧应用列表
接口说明
请求URL:http[s]://{网关地址}/mp/restful/v2/appList
请求方式: POST
请求内容类型: application/json
响应内容类型: application/json
请求说明
请求体
| 字段名 | 参数名 | 必填 | 类型 |
|---|---|---|---|
| 搜索内容 | searchContent | M | string |
| 多语言默认中文 | language | O | string |
| 用户账号 | userAccount | M | string |
请求示例
json
{
"language":"",
"searchContent":"",
"userAccount":"ampadmin"
}1
2
3
4
5
2
3
4
5
响应说明
响应体
| 字段名 | 参数名 | 类型 | 描述 |
|---|---|---|---|
| 状态码 | code | String | 0000请求成功 |
| 错误内容 | msg | string | 错误内容 |
| 数据 | data | List<MsgDetailVo> | 消息详情 |
| 字段名 | 参数名 | 类型 |
|---|---|---|
| 应用名字 | appName | string |
| 应用id | appId | string |
| 时间最新的消息内容 | latestMsgContent | string |
| 最新的消息发送时间yyyy-MM-dd HH:mm:ss | latestMsgSendDate | string |
| 消息内部应用id 冗余字段 | tagId | int |
| 该应用下消息总数 | total | int |
| 未读消息数量 | unReadMsgCount | int |
| 未过期的未读消息数量 | unexpiredUnreadNum | int |
| 最新的未读消息 | lastMessage | MsgVo |
| 字段名 | 参数名 | 类型 |
|---|---|---|
| appId | 应用id | string |
| content | 内容 | string |
| isRead | 是否已读 | short 0 未读 1 已读 |
| msgId | 消息的id | long |
| sendTime | 发送时间时间戳 精确到秒 | long |
| status | 是否已读 | short 0 未读 1 已读 |
| subject | 主题 | string |
| tagId | tagId | int |
| tagName | tag or 应用 名字 | string |
| updateTime | 更新时间 时间戳 精确到秒 | long |
响应示例
json
{
"code": "0000",
"data": [
{
"appId": "-1",
"appName": "标棋消息",
"tagId": 0,
"unexpiredUnreadNum": 0
},
{
"appId": "-3",
"appName": "必读消息",
"latestMsgContent": "测试08081833",
"latestMsgSendDate": "2023-08-08 18:34:43",
"tagId": -3,
"unReadMsgCount": 6,
"unexpiredUnreadNum": 0
},
{
"appId": "casp.cal",
"appName": "日程聚合",
"lastMessage": {
"appId": "100308",
"content": "日程2023-08-22 09:00:00",
"isRead": 0,
"msgId": 882766089503744,
"sendTime": 1695685530,
"status": 0,
"subject": "日程提醒",
"tagId": 100308,
"tagName": "日程聚合",
"updateTime": 1695685530
},
"latestMsgContent": "日程提醒:2023-08-22 08:00:00-2023-08-22 09:00:00",
"latestMsgSendDate": "2023-09-26 07:45:30",
"tagId": 100308,
"total": 7,
"unReadMsgCount": 6,
"unexpiredUnreadNum": 0
},
{
"appId": "915315903064530944",
"appName": "zj测试60消息",
"lastMessage": {
"appId": "100112",
"content": "xxxx0727001",
"isRead": 0,
"msgId": 861363940519936,
"sendTime": 1690460409,
"status": 0,
"subject": "",
"tagId": 100112,
"tagName": "zj测试60消息",
"updateTime": 1690460409
},
"latestMsgContent": "你好08081833",
"latestMsgSendDate": "2023-08-08 18:34:43",
"tagId": 100112,
"total": 8,
"unReadMsgCount": 6,
"unexpiredUnreadNum": 0
}
],
"subErrorCode": "0"
}1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
错误码
| 错误码 | 描述 |
|---|---|
| 0000 | 请求成功 |
| 其他 | 失败 |
Demo
java
Client client = new DefaultClient(BASE_URL, APP_ID, APP_SECRET);
AppListRequest request = new AppListRequest();
request.setSearchContent("");
request.setUserAccount("01119092");
AppListResponse response = client.execute(request);
if (response.isSuccess()) {
System.out.println(JSONObject.toJSONString(response));
} else {
throw new Exception("获取启用通道异常:" + JSONObject.toJSONString(response));
}1
2
3
4
5
6
7
8
9
10
2
3
4
5
6
7
8
9
10

