Appearance
1.根据自定义条件筛选消息列表
简要描述
- 消息列表查询,根据条件筛选消息列表
请求URL
https://open.gangtise.com/application/glory/queryMsgList
请求方式
- POST
请求头
请求头 | 类型 | 说明 |
---|---|---|
Authorization | String | accessToken,通accessToken接口获取 |
请求示例
{
"reqType": "0",
"reqId": "homepage",
"bizCode": "wx",
"condition": {
"must":{
"groupId":"25339524345@chatroom", // 群组id
"msgType": 0, // 消息类型
"contactId": "wxid_hc8d648vc5zq22" // 发言人微信id
},
"keywords":{
"search": ["测试"] // 消息内容关键字匹配
},
"range": {
"entry_time": { // 消息时间范围
"gt":1651363200000,
"lt":1652313600000
}
},
"from": 0,
"size": 10
},
"startNo": -1,
"endNo": -1
}
返回示例
{
"reqId": "homepage",
"status": true,
"data": [
{
"msgId": 5792479519683537132,
"msgTime": 1651114227000,
"msgNum": 791010862,
"chatType": 1,
"groupId": "25339524345@chatroom",
"contactId": "wxid_hc8d648vc5zq22",
"msgType": 0,
"msgText": "{\"content\":\"那建一个测试群\"}"
},
{
"msgId": 3911043521647742907,
"msgTime": 1651719211000,
"msgNum": 791011127,
"chatType": 2,
"groupId": "25339524345@chatroom",
"contactId": "wxid_hc8d648vc5zq22",
"msgType": 0,
"msgText": "{\"content\":\"这是一条测试消息\"}"
},
{
"msgId": 2871452424461822573,
"msgTime": 1651719207000,
"msgNum": 791011126,
"chatType": 2,
"groupId": "25339524345@chatroom",
"contactId": "wxid_hc8d648vc5zq22",
"msgType": 0,
"msgText": "{\"content\":\"开始测试\"}"
}
],
"msg": null
}
2.根据消息msgId查询消息列表
请求示例
{
"reqType": "0",
"reqId": "homepage",
"bizCode": "wx_robot",
"condition": {
"must":{
"msgId": ["7441277319780454296",""]
},
"from": 0,
"size": 10
},
"startNo": -1,
"endNo": -1
}
返回示例
{
"reqId": "homepage",
"status": true,
"data": [{
"id": 364243,
"msgId": "7441277319780454296",
"msgTime": 1685501811000,
"msgNum": 783660341,
"chatType": 2,
"groupId": "43631774087@chatroom",
"groupName": "UAT测试",
"contactId": "wxid_nqo2u8jmy2bz21",
"msgType": 4,
"msgText": "{\"extension\":\".txt\",\"size\":46866,\"resource_id\":15068484,\"description\":\"\",\"title\":\"data.txt\",\"url\":\"gdp%2Fwxrobot%2Fchat%2Ffile%2F2023-05-31%2Fdata.txt\"}",
"plainText": "贵州茅台111",
"entryTime": 1685501813001,
"updateTime": 1685501813001,
"contactNickname": "深邃黑暗幻想",
"contactGroupName": "深邃黑暗幻想",
"contactAvatar": "gdp%2Fwxrobot%2Fimages%2Fheader%2F2023-05-10%2F639962426501da324d63e91f105a225b",
"label": "|8267|45|18|17|10373|10151|34|",
"columnIdStr": "",
"columnCnNameStr": "",
"labelName": "|600519.SH|招商证券|",
"brokers": [
"招商证券"
],
"subLabelType": "WX",
"time": 1685501811000
}],
"msg": null
}
返回参数说明
字段名 | 字段类型 | 描述 |
---|---|---|
id | Long | 数据id |
msgId | String | 消息id |
msgTime | Long | 消息时间 |
msgNum | Long | 消息序号 |
chatType | Integer | 聊天类型 1:单聊 2:群聊 |
groupId | String | 微信群id |
groupName | String | 微信群名称 |
contactId | String | 发言人微信id |
msgType | Integer | 消息类型 0:文本 1:图片 2:视频 3:音频 4:文档 5:分享链接 6:自定义表情 |
msgText | Json | 聊天内容JSON 格式,{resource id":资源D,"quote message id"引用消息D,"content":"文本消息"title":"文件、链接标题} |
plainText | String | 消息文本内容 |
entryTime | Long | 入库时间 |
updateTime | Long | 更新时间 |
contactNickname | String | 昵称 |
contactGroupName | String | 微信群昵称 |
subLabelType | String | 标签业务类型 |
time | Long | 消息时间 |
label | String | 标签(部分标签不展示,不会有labelName) |
labelName | String | 标签名称 |
brokers | Array | 券商列表 |