主题
查询应用消息下各个通道的发送情况 3.5.4.Beta3+
查询应用消息下各个通道的发送情况
接口说明
请求URL:http[s]://{网关地址}/mp/restful/v2/getAppMsgSendDetail?current=1&size=1000&channelId=&sendState=&appMsgId=
请求方式: GET
响应内容类型: application/json
请求说明
查询参数
| 字段名 | 参数名 | 必填 | 类型 | 描述 |
|---|---|---|---|---|
| 页码 | current | O | int | 默认第一页 |
| 每页大小 | size | O | int | 默认10 最大值1000 |
| 通道id | channelId | O | string | 通道id |
| 发送状态 | sendState | O | string | 0 待发送 1 成功 2失败 |
| 应用消息id | appMsgId | O | string | 应用消息的id, |
请求示例
json
1
响应说明
响应体
ResponseResult<Page<ChannelMessageVo>>
| 字段名 | 参数名 | 类型 | 描述 |
|---|---|---|---|
| 状态码 | code | String | 0000请求成功 |
| 数据集 | data | Page<ChannelMessageVo> | 返回结果 |
Page<ChannelMessageVo>
| 字段名 | 参数名 | 类型 | 描述 |
|---|---|---|---|
| 每页的记录数 | size | long | 每页的记录数 |
| 总记录数 | total | long | 返回结果集的总数 |
| 页码数 | current | long | 页码数 |
| 结果集 | records | List<ChannelMessageVo> | 结果集 |
ChannelMessageVo
| 参数名 | 类型 | 描述 |
|---|---|---|
| id | string | 通道消息id |
| msgTitle | int | 消息标题 |
| msgBody | int | 消息内容 |
| channelName | string | 通道名字 |
| appName | string | 所属应用 |
| userId | string | 用户工号 |
| userName | string | 用户名字 |
| sendTime | string 格式 yyyy-MM-dd HH:mm:ss | 发送时间 |
| sendState | int | 通道消息的发送状态 0 待发送 1发送成功 2发送失败 4 发送失败后重试一直失败(2和4都是失败) |
| isEnable | int | 通道状态 |
| respCode | string | 调用发送消息能力的返回值 0 表示请求成功 其他失败 |
| respMsg | string | 失败原因 |
| isDeleted | int | 改通道消息对应的通道是否删除 0 通道没删除 1通道删除 |
| channelType 3.7.2.SP4+ | string | 通道类型 固定INBOX(收件箱) CAMPUSHOY(今日校园) EMAIL(邮件) SMS(短信) QYWECHAT(企业微信)DINGTALK(钉钉)WeChatService(微信服务号)WeLinkService(welink) |
| appChannelType 3.7.2.SP4+ | string | 对应sendType 1(收件箱) 2(今日校园) 3(邮件) 4(短信) 5(企业微信)6(钉钉)7(微信服务号)8(welink) |
| channelWid 3.7.2.SP4+ | string | 通道wid |
响应示例
{
"code": "0000",
"data": {
"current": 1,
"hitCount": false,
"optimizeCountSql": true,
"orders": [],
"pages": 1,
"records": [
{
"appName": "待办中心",
"channelName": "tlsunceshi1",
"id": "789737204794368",
"isDeleted": 0,
"isEnable": 1,
"msgBody": "截止2023-01-06 10:50:00您有2条待办任务尚未处理,请及时登录融门户查看待办事项",
"msgTitle": "您有未读待办提醒",
"respCode": "0",
"respMsg": "",
"sendState": 1,
"sendTime": "2023-01-06 10:50:04",
"userId": "jcx009",
"userName": "jcx009"
}
],
"searchCount": true,
"size": 10,
"total": 1
}
}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
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
错误码
| 错误码 | 描述 |
|---|---|
| 0000 | 请求成功 |
| 其他 | 失败 |
Demo
java
Client client = new DefaultClient(BASE_URL, APP_ID, APP_SECRET);
GetAppMsgSendDetailRequest request = new GetAppMsgSendDetailRequest();
request.setSize(10);
request.setCurrent(1);
request.setChannelId("1163832425927938048");
request.setAppMsgId("992583753207808");
GetAppMsgSendDetailResponse 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
11
12
2
3
4
5
6
7
8
9
10
11
12

