|
@@ -3,98 +3,96 @@ syntax = "proto3";
|
|
|
package message;
|
|
|
|
|
|
message SendMsgRequest {
|
|
|
- string receiveUserId = 1; //接收方用户ID
|
|
|
- string receiveName = 2; //接收方用户名
|
|
|
- string sendUserId = 3; //发送方用户ID
|
|
|
- string sendName = 4; //发送方用户名
|
|
|
- string title = 5; //主题
|
|
|
- string content = 6; //内容
|
|
|
- int64 msgType = 7; //消息类型 1:客服 2:系统通知 3:营销 4:用户会话
|
|
|
- string link = 8; //跳转链接
|
|
|
- int64 citeId = 9; //引用id
|
|
|
- string appid = 10; //应用标识
|
|
|
- int64 isdel = 11; //是否删除
|
|
|
- string sendTime = 12; //发送时间
|
|
|
- string sendMode = 13; //发送模式
|
|
|
- string receiveTime = 14; //接收时间
|
|
|
- int64 sendStatus = 15; //发送状态
|
|
|
- string updateTime = 16; //修改时间
|
|
|
+ string receiveUserId = 1; //接收方用户ID
|
|
|
+ string receiveName = 2; //接收方用户名
|
|
|
+ string sendUserId = 3; //发送方用户ID
|
|
|
+ string sendName = 4; //发送方用户名
|
|
|
+ string title = 5; //主题
|
|
|
+ string content = 6; //内容
|
|
|
+ int64 msgType = 7; //消息类型 1:客服 2:系统通知 3:营销 4:用户会话
|
|
|
+ string link = 8; //跳转链接
|
|
|
+ int64 citeId = 9; //引用id
|
|
|
+ string appid = 10; //应用标识
|
|
|
}
|
|
|
|
|
|
message ChangeReadStatusRequest {
|
|
|
- int64 id = 1; // 消息id
|
|
|
- int64 readStatus = 2; // 阅读状态 0-未读 1-已读
|
|
|
- string appid = 3; //应用标识
|
|
|
+ int64 id = 1; // 消息id
|
|
|
+ int64 readStatus = 2; // 阅读状态 0-未读 1-已读
|
|
|
+ string appid = 3; //应用标识
|
|
|
+}
|
|
|
+message ResCount{
|
|
|
+ int64 msgType = 1;// 类型及未读数量
|
|
|
+ int64 count = 2;// 类型及未读数量
|
|
|
}
|
|
|
-
|
|
|
// 删除单一消息
|
|
|
message DeleteSingleMessageRequest {
|
|
|
- int64 id = 1; // 消息id
|
|
|
- string appid = 3; //应用标识
|
|
|
+ int64 id = 1; // 消息id
|
|
|
+ string appid = 3; //应用标识
|
|
|
}
|
|
|
// 批量删除消息
|
|
|
message DeleteMultipleMessageRequest {
|
|
|
- string id = 1; // 多条消息id, 逗号分隔
|
|
|
- string appid = 3; //应用标识
|
|
|
+ string id = 1; // 多条消息id, 逗号分隔
|
|
|
+ string appid = 3; //应用标识
|
|
|
}
|
|
|
// 查询指定用户未读消息合计
|
|
|
message GetUnreadCountRequest {
|
|
|
- string userId = 1; // 用户id
|
|
|
- string appid = 2; //应用标识
|
|
|
+ string userId = 1; // 用户id
|
|
|
+ string appid = 2; //应用标识
|
|
|
}
|
|
|
|
|
|
message Response {
|
|
|
- int64 code = 1; //状态码
|
|
|
- string message = 2; //响应消息
|
|
|
+ int64 code = 1; //状态码
|
|
|
+ string message = 2; //响应消息
|
|
|
}
|
|
|
|
|
|
message GetUnreadCountResponse {
|
|
|
- int64 code = 1; //状态码
|
|
|
- string message = 2; //响应消息
|
|
|
- int64 count = 3; //
|
|
|
+ int64 code = 1; //状态码
|
|
|
+ string message = 2; //响应消息
|
|
|
+ int64 count = 3; //
|
|
|
}
|
|
|
|
|
|
message FindUserMsgReq {
|
|
|
- string userId = 1; //用户id
|
|
|
- string receiveUserId = 2; //聊天方用户id
|
|
|
- string appid = 3; //应用标识
|
|
|
- int64 offSet = 4; //当前
|
|
|
- int64 pageSize = 5; //大小
|
|
|
- int64 msgType = 6; //是否区分类型
|
|
|
- int64 read = 7; // 是否区分已读未读 -1 不区分已读未读 0 未读 1 已读
|
|
|
+ string userId = 1; //用户id
|
|
|
+ string receiveUserId = 2; //聊天方用户id
|
|
|
+ string appid = 3; //应用标识
|
|
|
+ int64 offSet = 4; //当前
|
|
|
+ int64 pageSize = 5; //大小
|
|
|
+ int64 msgType = 6; //是否区分类型
|
|
|
+ int64 read = 7; // 是否区分已读未读 -1 不区分已读未读 0 未读 1 已读
|
|
|
}
|
|
|
|
|
|
message Messages {
|
|
|
- string receiveUserId = 1; //接收方用户ID
|
|
|
- string receiveName = 2; //接收方用户名
|
|
|
- string sendUserId = 3; //发送方用户ID
|
|
|
- string sendName = 4; //发送方用户名
|
|
|
- string title = 5; //主题
|
|
|
- string content = 6; //内容
|
|
|
- int64 msgType = 7; //消息类型 1:客服 2:系统通知 3:营销 4:用户会话
|
|
|
- string link = 8; //跳转链接
|
|
|
- int64 citeId = 9; //引用id
|
|
|
- int64 isRead = 10; //已读未读 0:未读 1:已读
|
|
|
- string createtime = 11;
|
|
|
- string appid = 12; //应用标识
|
|
|
+ string receiveUserId = 1; //接收方用户ID
|
|
|
+ string receiveName = 2; //接收方用户名
|
|
|
+ string sendUserId = 3; //发送方用户ID
|
|
|
+ string sendName = 4; //发送方用户名
|
|
|
+ string title = 5; //主题
|
|
|
+ string content = 6; //内容
|
|
|
+ int64 msgType = 7; //消息类型 1:客服 2:系统通知 3:营销 4:用户会话
|
|
|
+ string link = 8; //跳转链接
|
|
|
+ int64 citeId = 9; //引用id
|
|
|
+ int64 isRead = 10; //已读未读 0:未读 1:已读
|
|
|
+ string createtime = 11;
|
|
|
+ string appid = 12; //应用标识
|
|
|
+ int64 id = 13;//消息id
|
|
|
}
|
|
|
|
|
|
message FindUserMsgRes {
|
|
|
- int64 code = 1; //状态码
|
|
|
- string message = 2; //响应消息
|
|
|
- repeated Messages data = 3; //
|
|
|
- int64 count = 4; //总数
|
|
|
+ int64 code = 1; //状态码
|
|
|
+ string message = 2; //响应消息
|
|
|
+ repeated Messages data = 3; //
|
|
|
+ int64 count = 4; //总数
|
|
|
}
|
|
|
|
|
|
message GetClassUnreadCountReq {
|
|
|
- string userId = 1; // 用户id
|
|
|
- int64 msgType = 2; //分类 1:客服 2:系统通知 3:营销 4:用户会话
|
|
|
- string appid = 3; //应用标识
|
|
|
+ string userId = 1; // 用户id
|
|
|
+ int64 msgType = 2; //分类 1:客服 2:系统通知 3:营销 4:用户会话
|
|
|
+ string appid = 3; //应用标识
|
|
|
}
|
|
|
|
|
|
//查看消息内容
|
|
|
message MessageDetailReq {
|
|
|
- int64 id = 1; //消息id
|
|
|
+ int64 id = 1; //消息id
|
|
|
}
|
|
|
message MessageDetailResp {
|
|
|
int64 code = 1; //状态码
|
|
@@ -102,32 +100,61 @@ message MessageDetailResp {
|
|
|
Messages data = 3; //
|
|
|
}
|
|
|
message GetLastMessageReq {
|
|
|
- string userId = 1; // 用户id
|
|
|
- int64 msgType = 2; //分类 1:客服 2:系统通知 3:营销 4:用户会话
|
|
|
- string appid = 3; //应用标识
|
|
|
+ string userId = 1; // 用户id
|
|
|
+ int64 msgType = 2; //分类 1:客服 2:系统通知 3:营销 4:用户会话
|
|
|
+ string appid = 3; //应用标识
|
|
|
}
|
|
|
message GetLastMessageRes {
|
|
|
- int64 code = 1; //状态码
|
|
|
- string message = 2; //响应消息
|
|
|
- Messages data = 3; //
|
|
|
+ int64 code = 1; //状态码
|
|
|
+ string message = 2; //响应消息
|
|
|
+ Messages data = 3; //
|
|
|
+}
|
|
|
+// 获取用户分类的的未读消息分类及数量 及分类下最新的消息
|
|
|
+message GetUnreadClassCountReq{
|
|
|
+ string userId = 1; // 用户id
|
|
|
+ string appid = 2; //应用标识
|
|
|
+}
|
|
|
+message GetUnreadClassCountRes{
|
|
|
+ int64 code = 1;//状态码
|
|
|
+ string message = 2;//响应消息
|
|
|
+ repeated ResCount data = 3;//
|
|
|
+ repeated Messages info = 4; // 每个类型最新消息列表
|
|
|
+
|
|
|
+}
|
|
|
+message GetMsgTypeReq{
|
|
|
+ string userId = 1; // 用户id
|
|
|
+ string appid = 2; //应用标识
|
|
|
+}
|
|
|
+message GetMsgTypeRes{
|
|
|
+ int64 code = 1;//状态码
|
|
|
+ string message = 2;//响应消息
|
|
|
+ repeated int64 data = 3;//
|
|
|
+
|
|
|
+
|
|
|
}
|
|
|
service Message {
|
|
|
- // 修改消息阅读状态
|
|
|
- rpc ChangeReadStatus (ChangeReadStatusRequest) returns (Response);
|
|
|
- //指定用户发消息
|
|
|
- rpc SendUserMsg (SendMsgRequest) returns (Response);
|
|
|
- // 删除单一消息
|
|
|
- rpc DeleteSingleMessage (DeleteSingleMessageRequest) returns (Response);
|
|
|
- // 删除多条消息
|
|
|
- rpc DeleteMultipleMessage (DeleteMultipleMessageRequest) returns (Response);
|
|
|
- // 查询指定用户未读消息合计
|
|
|
- rpc GetUnreadCount (GetUnreadCountRequest) returns (GetUnreadCountResponse);
|
|
|
- // 查询指定用户的历史消息记录
|
|
|
- rpc FindUserMsg (FindUserMsgReq) returns (FindUserMsgRes);
|
|
|
- // 查询指定用户指定分类的未读消息合计
|
|
|
- rpc GetClassUnreadCount (GetClassUnreadCountReq) returns (GetUnreadCountResponse);
|
|
|
- // 获取指定用户指定分类的最新一条未读消息
|
|
|
- rpc GetLastMessage (GetLastMessageReq) returns (GetLastMessageRes);
|
|
|
- //查看详细详情
|
|
|
- rpc FindMessageDetail (MessageDetailReq) returns (MessageDetailResp);
|
|
|
+
|
|
|
+
|
|
|
+ // 修改消息阅读状态
|
|
|
+ rpc ChangeReadStatus (ChangeReadStatusRequest) returns (Response);
|
|
|
+ //指定用户发消息
|
|
|
+ rpc SendUserMsg (SendMsgRequest) returns (Response);
|
|
|
+ // 删除单一消息
|
|
|
+ rpc DeleteSingleMessage (DeleteSingleMessageRequest) returns (Response);
|
|
|
+ // 删除多条消息
|
|
|
+ rpc DeleteMultipleMessage (DeleteMultipleMessageRequest) returns (Response);
|
|
|
+ // 查询指定用户未读消息合计
|
|
|
+ rpc GetUnreadCount (GetUnreadCountRequest) returns (GetUnreadCountResponse);
|
|
|
+ // 查询指定用户的历史消息记录
|
|
|
+ rpc FindUserMsg (FindUserMsgReq) returns (FindUserMsgRes);
|
|
|
+ // 查询指定用户指定分类的未读消息合计
|
|
|
+ rpc GetClassUnreadCount (GetClassUnreadCountReq) returns (GetUnreadCountResponse);
|
|
|
+ // 获取指定用户指定分类的最新一条未读消息
|
|
|
+ rpc GetLastMessage (GetLastMessageReq) returns (GetLastMessageRes);
|
|
|
+ //查看详细详情
|
|
|
+ rpc FindMessageDetail (MessageDetailReq) returns (MessageDetailResp);
|
|
|
+ // 获取指定用户的未读消息分类及数量 及分类的最新消息
|
|
|
+ rpc GetUnreadClassCount(GetUnreadClassCountReq) returns(GetUnreadClassCountRes);
|
|
|
+ // 获取指定用户收到消息的分类
|
|
|
+ rpc GetMsgType(GetMsgTypeReq) returns(GetMsgTypeRes);
|
|
|
}
|