Open fzdwx opened 2 years ago
消息的前6位用来表示类型
String err = "777777";
String success = "666666";
String chat = "100101";
String replayChat = "100102";
String notify= "100201";
现在这样传入,不用传type了
100101{
"randomId": "e81a68c3c486720fb",
"id": "444444444444",
"toId": "444444444444",
"sessionType": "1",
"fromUname": "fzdwx",
"chatMessage": {
"content": "啊实打实",
"sendTime": "2022-04-27 23:22:19",
"leftOrRight": "2",
"contentType": 1
}
}
这是现在后端返回的包
666666{"message":"ok","randomId":"e81a1628c3c4286720fb"}
100102{
"data": {
"boxOwnerId": "111111111111",
"boxOwnerSeq": "6",
"messageId": "309842667163152384"
},
"randomId": "e81a1628c3c4286720fb"
}
这是来自QQ邮箱的假期自动回复邮件。 您好,我最近正在休假中,无法亲自回复您的邮件。我将在假期结束后,尽快给您回复。
Describe the effect you want to achieve
这是当前的消息
之后
Describe the solution you'd like 在解析为JSON之前先读取一个int,来表示类型。
这将为性能带来提升