diff --git a/cmd/open_im_api/main.go b/cmd/open_im_api/main.go index 42e0dcabf..0bd70d7e3 100644 --- a/cmd/open_im_api/main.go +++ b/cmd/open_im_api/main.go @@ -3,6 +3,7 @@ package main import ( apiAuth "Open_IM/internal/api/auth" apiChat "Open_IM/internal/api/chat" + "Open_IM/internal/api/conversation" "Open_IM/internal/api/friend" "Open_IM/internal/api/group" "Open_IM/internal/api/manage" @@ -17,15 +18,6 @@ import ( ) func main() { - - //logFile, err := os.OpenFile("./fatal.log", os.O_CREATE|os.O_APPEND|os.O_RDWR, 0660) - // if err != nil { - - // return - // } - //syscall.Dup2(int(logFile.Fd()), int(os.Stderr.Fd())) - - //log.Info("", "", "api server running...") r := gin.Default() r.Use(utils.CorsHandler()) // user routing group, which handles user registration and login services @@ -100,8 +92,9 @@ func main() { //Conversation conversationGroup := r.Group("/conversation") { - conversationGroup.POST("/delete_user", manage.DeleteUser) - + conversationGroup.POST("/set_receive_message_opt", conversation.SetReceiveMessageOpt) + conversationGroup.POST("/get_receive_message_opt", conversation.GetReceiveMessageOpt) + conversationGroup.POST("/get_all_conversation_message_opt", conversation.GetAllConversationMessageOpt) } log.NewPrivateLog("api") diff --git a/internal/api/conversation/conversation.go b/internal/api/conversation/conversation.go new file mode 100644 index 000000000..c73e161c5 --- /dev/null +++ b/internal/api/conversation/conversation.go @@ -0,0 +1,155 @@ +package conversation + +import ( + "Open_IM/pkg/common/config" + "Open_IM/pkg/common/log" + "Open_IM/pkg/common/token_verify" + "Open_IM/pkg/grpc-etcdv3/getcdv3" + "Open_IM/pkg/proto/user" + "context" + "github.com/gin-gonic/gin" + "net/http" + "strings" +) + +type paramsSetReceiveMessageOpt struct { + OperationID string `json:"operationID" binding:"required"` + Option int32 `json:"operationID" binding:"required"` + ConversationIdList []string `json:"conversationIdList" binding:"required"` +} + +type SetReceiveMessageOptResp struct { + ErrCode int32 `json:"errCode"` + ErrMsg string `json:"errMsg"` + Data []*user.OptResult `json:"data"` +} + +type paramGetReceiveMessageOpt struct { + ConversationIdList []string `json:"ConversationIdList" binding:"required"` + OperationID string `json:"operationID" binding:"required"` +} + +type GetReceiveMessageOptResp struct { + SetReceiveMessageOptResp +} + +type paramGetAllConversationMessageOpt struct { + OperationID string `json:"operationID" binding:"required"` +} + +type GetAllConversationMessageOptResp struct { + SetReceiveMessageOptResp +} + +func GetAllConversationMessageOpt(c *gin.Context) { + params := paramGetAllConversationMessageOpt{} + if err := c.BindJSON(¶ms); err != nil { + log.NewError(params.OperationID, "bind json failed ", err.Error(), c) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()}) + return + } + + claims, err := token_verify.ParseToken(c.Request.Header.Get("token")) + if err != nil { + log.NewError(params.OperationID, "ParseToken failed, ", err.Error(), c.Request.Header.Get("token")) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "ParseToken failed, " + err.Error()}) + return + } + + req := &user.GetAllConversationMsgOptReq{ + UId: claims.UID, + OperationID: params.OperationID, + } + log.NewInfo(req.OperationID, "GetAllConversationMsgOpt req: ", req) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) + client := user.NewUserClient(etcdConn) + resp, err := client.GetAllConversationMsgOpt(context.Background(), req) + if err != nil { + log.NewError(params.OperationID, "GetAllConversationMsgOpt rpc failed, ", req, err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "GetAllConversationMsgOpt rpc failed, " + err.Error()}) + return + } + var ginResp GetAllConversationMessageOptResp + ginResp.ErrCode = resp.ErrCode + ginResp.ErrMsg = resp.ErrMsg + ginResp.Data = resp.ConversationOptResult + log.NewInfo(req.OperationID, "GetAllConversationMsgOpt resp: ", ginResp, req) + c.JSON(http.StatusOK, ginResp) +} + +func GetReceiveMessageOpt(c *gin.Context) { + params := paramGetReceiveMessageOpt{} + if err := c.BindJSON(¶ms); err != nil { + log.NewError(params.OperationID, "bind json failed ", err.Error(), c) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()}) + return + } + + claims, err := token_verify.ParseToken(c.Request.Header.Get("token")) + if err != nil { + log.NewError(params.OperationID, "ParseToken failed, ", err.Error(), c.Request.Header.Get("token")) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "ParseToken failed, " + err.Error()}) + return + } + + req := &user.GetReceiveMessageOptReq{ + UId: claims.UID, + ConversationId: params.ConversationIdList, + OperationID: params.OperationID, + } + log.NewInfo(req.OperationID, "GetReceiveMessageOptReq req: ", req) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) + client := user.NewUserClient(etcdConn) + resp, err := client.GetReceiveMessageOpt(context.Background(), req) + if err != nil { + log.NewError(params.OperationID, "GetReceiveMessageOpt rpc failed, ", req, err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "GetReceiveMessageOpt rpc failed, " + err.Error()}) + return + } + var ginResp GetReceiveMessageOptResp + ginResp.ErrCode = resp.ErrCode + ginResp.ErrMsg = resp.ErrMsg + ginResp.Data = resp.ConversationOptResult + log.NewInfo(req.OperationID, "GetReceiveMessageOpt resp: ", ginResp) + c.JSON(http.StatusOK, ginResp) +} + +func SetReceiveMessageOpt(c *gin.Context) { + params := paramsSetReceiveMessageOpt{} + if err := c.BindJSON(¶ms); err != nil { + log.NewError(params.OperationID, "bind json failed ", err.Error(), c) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 400, "errMsg": "bind json failed " + err.Error()}) + return + } + + claims, err := token_verify.ParseToken(c.Request.Header.Get("token")) + if err != nil { + log.NewError(params.OperationID, "ParseToken failed, ", err.Error(), c.Request.Header.Get("token")) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "ParseToken failed, " + err.Error()}) + return + } + + req := &user.SetReceiveMessageOptReq{ + UId: claims.UID, + Opt: params.Option, + ConversationId: params.ConversationIdList, + OperationID: params.OperationID, + } + log.NewInfo(req.OperationID, "SetReceiveMessageOpt req: ", req) + etcdConn := getcdv3.GetConn(config.Config.Etcd.EtcdSchema, strings.Join(config.Config.Etcd.EtcdAddr, ","), config.Config.RpcRegisterName.OpenImUserName) + client := user.NewUserClient(etcdConn) + resp, err := client.SetReceiveMessageOpt(context.Background(), req) + if err != nil { + log.NewError(params.OperationID, "SetReceiveMessageOpt rpc failed, ", req, err.Error()) + c.JSON(http.StatusBadRequest, gin.H{"errCode": 401, "errMsg": "SetReceiveMessageOpt rpc failed, " + err.Error()}) + return + } + + ginResp := SetReceiveMessageOptResp{ + ErrCode: resp.ErrCode, + ErrMsg: resp.ErrMsg, + Data: resp.OptResult, + } + log.NewInfo(req.OperationID, "SetReceiveMessageOpt resp: ", ginResp) + c.JSON(http.StatusOK, ginResp) +} diff --git a/internal/push/logic/push_to_client.go b/internal/push/logic/push_to_client.go index c2d986a59..390ba42c5 100644 --- a/internal/push/logic/push_to_client.go +++ b/internal/push/logic/push_to_client.go @@ -146,8 +146,8 @@ func SendMsgByWS(m *pbChat.WSToMsgSvrChatMsg) { default: } - } + func sendMsgToKafka(m *pbChat.WSToMsgSvrChatMsg, key string, flag string) { pid, offset, err := producer.SendMessage(m, key) if err != nil { diff --git a/pkg/proto/user/user.pb.go b/pkg/proto/user/user.pb.go index 298512e1b..af16cf75a 100644 --- a/pkg/proto/user/user.pb.go +++ b/pkg/proto/user/user.pb.go @@ -35,7 +35,7 @@ func (m *CommonResp) Reset() { *m = CommonResp{} } func (m *CommonResp) String() string { return proto.CompactTextString(m) } func (*CommonResp) ProtoMessage() {} func (*CommonResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_23985c8245c722d0, []int{0} + return fileDescriptor_user_2aac409c3ed42d0b, []int{0} } func (m *CommonResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_CommonResp.Unmarshal(m, b) @@ -81,7 +81,7 @@ func (m *DeleteUsersResp) Reset() { *m = DeleteUsersResp{} } func (m *DeleteUsersResp) String() string { return proto.CompactTextString(m) } func (*DeleteUsersResp) ProtoMessage() {} func (*DeleteUsersResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_23985c8245c722d0, []int{1} + return fileDescriptor_user_2aac409c3ed42d0b, []int{1} } func (m *DeleteUsersResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteUsersResp.Unmarshal(m, b) @@ -128,7 +128,7 @@ func (m *DeleteUsersReq) Reset() { *m = DeleteUsersReq{} } func (m *DeleteUsersReq) String() string { return proto.CompactTextString(m) } func (*DeleteUsersReq) ProtoMessage() {} func (*DeleteUsersReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_23985c8245c722d0, []int{2} + return fileDescriptor_user_2aac409c3ed42d0b, []int{2} } func (m *DeleteUsersReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_DeleteUsersReq.Unmarshal(m, b) @@ -181,7 +181,7 @@ func (m *GetAllUsersUidReq) Reset() { *m = GetAllUsersUidReq{} } func (m *GetAllUsersUidReq) String() string { return proto.CompactTextString(m) } func (*GetAllUsersUidReq) ProtoMessage() {} func (*GetAllUsersUidReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_23985c8245c722d0, []int{3} + return fileDescriptor_user_2aac409c3ed42d0b, []int{3} } func (m *GetAllUsersUidReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllUsersUidReq.Unmarshal(m, b) @@ -227,7 +227,7 @@ func (m *GetAllUsersUidResp) Reset() { *m = GetAllUsersUidResp{} } func (m *GetAllUsersUidResp) String() string { return proto.CompactTextString(m) } func (*GetAllUsersUidResp) ProtoMessage() {} func (*GetAllUsersUidResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_23985c8245c722d0, []int{4} + return fileDescriptor_user_2aac409c3ed42d0b, []int{4} } func (m *GetAllUsersUidResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetAllUsersUidResp.Unmarshal(m, b) @@ -274,7 +274,7 @@ func (m *GetUserInfoReq) Reset() { *m = GetUserInfoReq{} } func (m *GetUserInfoReq) String() string { return proto.CompactTextString(m) } func (*GetUserInfoReq) ProtoMessage() {} func (*GetUserInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_23985c8245c722d0, []int{5} + return fileDescriptor_user_2aac409c3ed42d0b, []int{5} } func (m *GetUserInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserInfoReq.Unmarshal(m, b) @@ -328,7 +328,7 @@ func (m *GetUserInfoResp) Reset() { *m = GetUserInfoResp{} } func (m *GetUserInfoResp) String() string { return proto.CompactTextString(m) } func (*GetUserInfoResp) ProtoMessage() {} func (*GetUserInfoResp) Descriptor() ([]byte, []int) { - return fileDescriptor_user_23985c8245c722d0, []int{6} + return fileDescriptor_user_2aac409c3ed42d0b, []int{6} } func (m *GetUserInfoResp) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_GetUserInfoResp.Unmarshal(m, b) @@ -387,7 +387,7 @@ func (m *UserInfo) Reset() { *m = UserInfo{} } func (m *UserInfo) String() string { return proto.CompactTextString(m) } func (*UserInfo) ProtoMessage() {} func (*UserInfo) Descriptor() ([]byte, []int) { - return fileDescriptor_user_23985c8245c722d0, []int{7} + return fileDescriptor_user_2aac409c3ed42d0b, []int{7} } func (m *UserInfo) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UserInfo.Unmarshal(m, b) @@ -475,7 +475,7 @@ func (m *LogoutReq) Reset() { *m = LogoutReq{} } func (m *LogoutReq) String() string { return proto.CompactTextString(m) } func (*LogoutReq) ProtoMessage() {} func (*LogoutReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_23985c8245c722d0, []int{8} + return fileDescriptor_user_2aac409c3ed42d0b, []int{8} } func (m *LogoutReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_LogoutReq.Unmarshal(m, b) @@ -529,7 +529,7 @@ func (m *UpdateUserInfoReq) Reset() { *m = UpdateUserInfoReq{} } func (m *UpdateUserInfoReq) String() string { return proto.CompactTextString(m) } func (*UpdateUserInfoReq) ProtoMessage() {} func (*UpdateUserInfoReq) Descriptor() ([]byte, []int) { - return fileDescriptor_user_23985c8245c722d0, []int{9} + return fileDescriptor_user_2aac409c3ed42d0b, []int{9} } func (m *UpdateUserInfoReq) XXX_Unmarshal(b []byte) error { return xxx_messageInfo_UpdateUserInfoReq.Unmarshal(m, b) @@ -619,6 +619,376 @@ func (m *UpdateUserInfoReq) GetUid() string { return "" } +type SetReceiveMessageOptReq struct { + UId string `protobuf:"bytes,1,opt,name=uId" json:"uId,omitempty"` + Opt int32 `protobuf:"varint,2,opt,name=opt" json:"opt,omitempty"` + ConversationId []string `protobuf:"bytes,3,rep,name=conversationId" json:"conversationId,omitempty"` + OperationID string `protobuf:"bytes,4,opt,name=operationID" json:"operationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetReceiveMessageOptReq) Reset() { *m = SetReceiveMessageOptReq{} } +func (m *SetReceiveMessageOptReq) String() string { return proto.CompactTextString(m) } +func (*SetReceiveMessageOptReq) ProtoMessage() {} +func (*SetReceiveMessageOptReq) Descriptor() ([]byte, []int) { + return fileDescriptor_user_2aac409c3ed42d0b, []int{10} +} +func (m *SetReceiveMessageOptReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetReceiveMessageOptReq.Unmarshal(m, b) +} +func (m *SetReceiveMessageOptReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetReceiveMessageOptReq.Marshal(b, m, deterministic) +} +func (dst *SetReceiveMessageOptReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetReceiveMessageOptReq.Merge(dst, src) +} +func (m *SetReceiveMessageOptReq) XXX_Size() int { + return xxx_messageInfo_SetReceiveMessageOptReq.Size(m) +} +func (m *SetReceiveMessageOptReq) XXX_DiscardUnknown() { + xxx_messageInfo_SetReceiveMessageOptReq.DiscardUnknown(m) +} + +var xxx_messageInfo_SetReceiveMessageOptReq proto.InternalMessageInfo + +func (m *SetReceiveMessageOptReq) GetUId() string { + if m != nil { + return m.UId + } + return "" +} + +func (m *SetReceiveMessageOptReq) GetOpt() int32 { + if m != nil { + return m.Opt + } + return 0 +} + +func (m *SetReceiveMessageOptReq) GetConversationId() []string { + if m != nil { + return m.ConversationId + } + return nil +} + +func (m *SetReceiveMessageOptReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type SetReceiveMessageOptResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + OptResult []*OptResult `protobuf:"bytes,3,rep,name=optResult" json:"optResult,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *SetReceiveMessageOptResp) Reset() { *m = SetReceiveMessageOptResp{} } +func (m *SetReceiveMessageOptResp) String() string { return proto.CompactTextString(m) } +func (*SetReceiveMessageOptResp) ProtoMessage() {} +func (*SetReceiveMessageOptResp) Descriptor() ([]byte, []int) { + return fileDescriptor_user_2aac409c3ed42d0b, []int{11} +} +func (m *SetReceiveMessageOptResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_SetReceiveMessageOptResp.Unmarshal(m, b) +} +func (m *SetReceiveMessageOptResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_SetReceiveMessageOptResp.Marshal(b, m, deterministic) +} +func (dst *SetReceiveMessageOptResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_SetReceiveMessageOptResp.Merge(dst, src) +} +func (m *SetReceiveMessageOptResp) XXX_Size() int { + return xxx_messageInfo_SetReceiveMessageOptResp.Size(m) +} +func (m *SetReceiveMessageOptResp) XXX_DiscardUnknown() { + xxx_messageInfo_SetReceiveMessageOptResp.DiscardUnknown(m) +} + +var xxx_messageInfo_SetReceiveMessageOptResp proto.InternalMessageInfo + +func (m *SetReceiveMessageOptResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *SetReceiveMessageOptResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *SetReceiveMessageOptResp) GetOptResult() []*OptResult { + if m != nil { + return m.OptResult + } + return nil +} + +type GetReceiveMessageOptReq struct { + UId string `protobuf:"bytes,1,opt,name=uId" json:"uId,omitempty"` + ConversationId []string `protobuf:"bytes,2,rep,name=conversationId" json:"conversationId,omitempty"` + OperationID string `protobuf:"bytes,3,opt,name=operationID" json:"operationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetReceiveMessageOptReq) Reset() { *m = GetReceiveMessageOptReq{} } +func (m *GetReceiveMessageOptReq) String() string { return proto.CompactTextString(m) } +func (*GetReceiveMessageOptReq) ProtoMessage() {} +func (*GetReceiveMessageOptReq) Descriptor() ([]byte, []int) { + return fileDescriptor_user_2aac409c3ed42d0b, []int{12} +} +func (m *GetReceiveMessageOptReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetReceiveMessageOptReq.Unmarshal(m, b) +} +func (m *GetReceiveMessageOptReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetReceiveMessageOptReq.Marshal(b, m, deterministic) +} +func (dst *GetReceiveMessageOptReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetReceiveMessageOptReq.Merge(dst, src) +} +func (m *GetReceiveMessageOptReq) XXX_Size() int { + return xxx_messageInfo_GetReceiveMessageOptReq.Size(m) +} +func (m *GetReceiveMessageOptReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetReceiveMessageOptReq.DiscardUnknown(m) +} + +var xxx_messageInfo_GetReceiveMessageOptReq proto.InternalMessageInfo + +func (m *GetReceiveMessageOptReq) GetUId() string { + if m != nil { + return m.UId + } + return "" +} + +func (m *GetReceiveMessageOptReq) GetConversationId() []string { + if m != nil { + return m.ConversationId + } + return nil +} + +func (m *GetReceiveMessageOptReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type OptResult struct { + ConversationId string `protobuf:"bytes,1,opt,name=conversationId" json:"conversationId,omitempty"` + Result int32 `protobuf:"varint,2,opt,name=result" json:"result,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *OptResult) Reset() { *m = OptResult{} } +func (m *OptResult) String() string { return proto.CompactTextString(m) } +func (*OptResult) ProtoMessage() {} +func (*OptResult) Descriptor() ([]byte, []int) { + return fileDescriptor_user_2aac409c3ed42d0b, []int{13} +} +func (m *OptResult) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_OptResult.Unmarshal(m, b) +} +func (m *OptResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_OptResult.Marshal(b, m, deterministic) +} +func (dst *OptResult) XXX_Merge(src proto.Message) { + xxx_messageInfo_OptResult.Merge(dst, src) +} +func (m *OptResult) XXX_Size() int { + return xxx_messageInfo_OptResult.Size(m) +} +func (m *OptResult) XXX_DiscardUnknown() { + xxx_messageInfo_OptResult.DiscardUnknown(m) +} + +var xxx_messageInfo_OptResult proto.InternalMessageInfo + +func (m *OptResult) GetConversationId() string { + if m != nil { + return m.ConversationId + } + return "" +} + +func (m *OptResult) GetResult() int32 { + if m != nil { + return m.Result + } + return 0 +} + +type GetReceiveMessageOptResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + ConversationOptResult []*OptResult `protobuf:"bytes,3,rep,name=conversationOptResult" json:"conversationOptResult,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetReceiveMessageOptResp) Reset() { *m = GetReceiveMessageOptResp{} } +func (m *GetReceiveMessageOptResp) String() string { return proto.CompactTextString(m) } +func (*GetReceiveMessageOptResp) ProtoMessage() {} +func (*GetReceiveMessageOptResp) Descriptor() ([]byte, []int) { + return fileDescriptor_user_2aac409c3ed42d0b, []int{14} +} +func (m *GetReceiveMessageOptResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetReceiveMessageOptResp.Unmarshal(m, b) +} +func (m *GetReceiveMessageOptResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetReceiveMessageOptResp.Marshal(b, m, deterministic) +} +func (dst *GetReceiveMessageOptResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetReceiveMessageOptResp.Merge(dst, src) +} +func (m *GetReceiveMessageOptResp) XXX_Size() int { + return xxx_messageInfo_GetReceiveMessageOptResp.Size(m) +} +func (m *GetReceiveMessageOptResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetReceiveMessageOptResp.DiscardUnknown(m) +} + +var xxx_messageInfo_GetReceiveMessageOptResp proto.InternalMessageInfo + +func (m *GetReceiveMessageOptResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *GetReceiveMessageOptResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *GetReceiveMessageOptResp) GetConversationOptResult() []*OptResult { + if m != nil { + return m.ConversationOptResult + } + return nil +} + +type GetAllConversationMsgOptReq struct { + UId string `protobuf:"bytes,1,opt,name=uId" json:"uId,omitempty"` + OperationID string `protobuf:"bytes,2,opt,name=operationID" json:"operationID,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetAllConversationMsgOptReq) Reset() { *m = GetAllConversationMsgOptReq{} } +func (m *GetAllConversationMsgOptReq) String() string { return proto.CompactTextString(m) } +func (*GetAllConversationMsgOptReq) ProtoMessage() {} +func (*GetAllConversationMsgOptReq) Descriptor() ([]byte, []int) { + return fileDescriptor_user_2aac409c3ed42d0b, []int{15} +} +func (m *GetAllConversationMsgOptReq) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetAllConversationMsgOptReq.Unmarshal(m, b) +} +func (m *GetAllConversationMsgOptReq) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetAllConversationMsgOptReq.Marshal(b, m, deterministic) +} +func (dst *GetAllConversationMsgOptReq) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAllConversationMsgOptReq.Merge(dst, src) +} +func (m *GetAllConversationMsgOptReq) XXX_Size() int { + return xxx_messageInfo_GetAllConversationMsgOptReq.Size(m) +} +func (m *GetAllConversationMsgOptReq) XXX_DiscardUnknown() { + xxx_messageInfo_GetAllConversationMsgOptReq.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAllConversationMsgOptReq proto.InternalMessageInfo + +func (m *GetAllConversationMsgOptReq) GetUId() string { + if m != nil { + return m.UId + } + return "" +} + +func (m *GetAllConversationMsgOptReq) GetOperationID() string { + if m != nil { + return m.OperationID + } + return "" +} + +type GetAllConversationMsgOptResp struct { + ErrCode int32 `protobuf:"varint,1,opt,name=errCode" json:"errCode,omitempty"` + ErrMsg string `protobuf:"bytes,2,opt,name=errMsg" json:"errMsg,omitempty"` + ConversationOptResult []*OptResult `protobuf:"bytes,3,rep,name=conversationOptResult" json:"conversationOptResult,omitempty"` + XXX_NoUnkeyedLiteral struct{} `json:"-"` + XXX_unrecognized []byte `json:"-"` + XXX_sizecache int32 `json:"-"` +} + +func (m *GetAllConversationMsgOptResp) Reset() { *m = GetAllConversationMsgOptResp{} } +func (m *GetAllConversationMsgOptResp) String() string { return proto.CompactTextString(m) } +func (*GetAllConversationMsgOptResp) ProtoMessage() {} +func (*GetAllConversationMsgOptResp) Descriptor() ([]byte, []int) { + return fileDescriptor_user_2aac409c3ed42d0b, []int{16} +} +func (m *GetAllConversationMsgOptResp) XXX_Unmarshal(b []byte) error { + return xxx_messageInfo_GetAllConversationMsgOptResp.Unmarshal(m, b) +} +func (m *GetAllConversationMsgOptResp) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) { + return xxx_messageInfo_GetAllConversationMsgOptResp.Marshal(b, m, deterministic) +} +func (dst *GetAllConversationMsgOptResp) XXX_Merge(src proto.Message) { + xxx_messageInfo_GetAllConversationMsgOptResp.Merge(dst, src) +} +func (m *GetAllConversationMsgOptResp) XXX_Size() int { + return xxx_messageInfo_GetAllConversationMsgOptResp.Size(m) +} +func (m *GetAllConversationMsgOptResp) XXX_DiscardUnknown() { + xxx_messageInfo_GetAllConversationMsgOptResp.DiscardUnknown(m) +} + +var xxx_messageInfo_GetAllConversationMsgOptResp proto.InternalMessageInfo + +func (m *GetAllConversationMsgOptResp) GetErrCode() int32 { + if m != nil { + return m.ErrCode + } + return 0 +} + +func (m *GetAllConversationMsgOptResp) GetErrMsg() string { + if m != nil { + return m.ErrMsg + } + return "" +} + +func (m *GetAllConversationMsgOptResp) GetConversationOptResult() []*OptResult { + if m != nil { + return m.ConversationOptResult + } + return nil +} + func init() { proto.RegisterType((*CommonResp)(nil), "user.CommonResp") proto.RegisterType((*DeleteUsersResp)(nil), "user.DeleteUsersResp") @@ -630,6 +1000,13 @@ func init() { proto.RegisterType((*UserInfo)(nil), "user.UserInfo") proto.RegisterType((*LogoutReq)(nil), "user.LogoutReq") proto.RegisterType((*UpdateUserInfoReq)(nil), "user.UpdateUserInfoReq") + proto.RegisterType((*SetReceiveMessageOptReq)(nil), "user.SetReceiveMessageOptReq") + proto.RegisterType((*SetReceiveMessageOptResp)(nil), "user.SetReceiveMessageOptResp") + proto.RegisterType((*GetReceiveMessageOptReq)(nil), "user.GetReceiveMessageOptReq") + proto.RegisterType((*OptResult)(nil), "user.OptResult") + proto.RegisterType((*GetReceiveMessageOptResp)(nil), "user.GetReceiveMessageOptResp") + proto.RegisterType((*GetAllConversationMsgOptReq)(nil), "user.GetAllConversationMsgOptReq") + proto.RegisterType((*GetAllConversationMsgOptResp)(nil), "user.GetAllConversationMsgOptResp") } // Reference imports to suppress errors if they are not otherwise used. @@ -647,6 +1024,9 @@ type UserClient interface { UpdateUserInfo(ctx context.Context, in *UpdateUserInfoReq, opts ...grpc.CallOption) (*CommonResp, error) DeleteUsers(ctx context.Context, in *DeleteUsersReq, opts ...grpc.CallOption) (*DeleteUsersResp, error) GetAllUsersUid(ctx context.Context, in *GetAllUsersUidReq, opts ...grpc.CallOption) (*GetAllUsersUidResp, error) + SetReceiveMessageOpt(ctx context.Context, in *SetReceiveMessageOptReq, opts ...grpc.CallOption) (*SetReceiveMessageOptResp, error) + GetReceiveMessageOpt(ctx context.Context, in *GetReceiveMessageOptReq, opts ...grpc.CallOption) (*GetReceiveMessageOptResp, error) + GetAllConversationMsgOpt(ctx context.Context, in *GetAllConversationMsgOptReq, opts ...grpc.CallOption) (*GetAllConversationMsgOptResp, error) } type userClient struct { @@ -693,6 +1073,33 @@ func (c *userClient) GetAllUsersUid(ctx context.Context, in *GetAllUsersUidReq, return out, nil } +func (c *userClient) SetReceiveMessageOpt(ctx context.Context, in *SetReceiveMessageOptReq, opts ...grpc.CallOption) (*SetReceiveMessageOptResp, error) { + out := new(SetReceiveMessageOptResp) + err := grpc.Invoke(ctx, "/user.user/SetReceiveMessageOpt", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userClient) GetReceiveMessageOpt(ctx context.Context, in *GetReceiveMessageOptReq, opts ...grpc.CallOption) (*GetReceiveMessageOptResp, error) { + out := new(GetReceiveMessageOptResp) + err := grpc.Invoke(ctx, "/user.user/GetReceiveMessageOpt", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *userClient) GetAllConversationMsgOpt(ctx context.Context, in *GetAllConversationMsgOptReq, opts ...grpc.CallOption) (*GetAllConversationMsgOptResp, error) { + out := new(GetAllConversationMsgOptResp) + err := grpc.Invoke(ctx, "/user.user/GetAllConversationMsgOpt", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + // Server API for User service type UserServer interface { @@ -700,6 +1107,9 @@ type UserServer interface { UpdateUserInfo(context.Context, *UpdateUserInfoReq) (*CommonResp, error) DeleteUsers(context.Context, *DeleteUsersReq) (*DeleteUsersResp, error) GetAllUsersUid(context.Context, *GetAllUsersUidReq) (*GetAllUsersUidResp, error) + SetReceiveMessageOpt(context.Context, *SetReceiveMessageOptReq) (*SetReceiveMessageOptResp, error) + GetReceiveMessageOpt(context.Context, *GetReceiveMessageOptReq) (*GetReceiveMessageOptResp, error) + GetAllConversationMsgOpt(context.Context, *GetAllConversationMsgOptReq) (*GetAllConversationMsgOptResp, error) } func RegisterUserServer(s *grpc.Server, srv UserServer) { @@ -778,6 +1188,60 @@ func _User_GetAllUsersUid_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } +func _User_SetReceiveMessageOpt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(SetReceiveMessageOptReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).SetReceiveMessageOpt(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/user.user/SetReceiveMessageOpt", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).SetReceiveMessageOpt(ctx, req.(*SetReceiveMessageOptReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _User_GetReceiveMessageOpt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetReceiveMessageOptReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).GetReceiveMessageOpt(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/user.user/GetReceiveMessageOpt", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).GetReceiveMessageOpt(ctx, req.(*GetReceiveMessageOptReq)) + } + return interceptor(ctx, in, info, handler) +} + +func _User_GetAllConversationMsgOpt_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(GetAllConversationMsgOptReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(UserServer).GetAllConversationMsgOpt(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/user.user/GetAllConversationMsgOpt", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(UserServer).GetAllConversationMsgOpt(ctx, req.(*GetAllConversationMsgOptReq)) + } + return interceptor(ctx, in, info, handler) +} + var _User_serviceDesc = grpc.ServiceDesc{ ServiceName: "user.user", HandlerType: (*UserServer)(nil), @@ -798,49 +1262,75 @@ var _User_serviceDesc = grpc.ServiceDesc{ MethodName: "GetAllUsersUid", Handler: _User_GetAllUsersUid_Handler, }, + { + MethodName: "SetReceiveMessageOpt", + Handler: _User_SetReceiveMessageOpt_Handler, + }, + { + MethodName: "GetReceiveMessageOpt", + Handler: _User_GetReceiveMessageOpt_Handler, + }, + { + MethodName: "GetAllConversationMsgOpt", + Handler: _User_GetAllConversationMsgOpt_Handler, + }, }, Streams: []grpc.StreamDesc{}, Metadata: "user/user.proto", } -func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_23985c8245c722d0) } - -var fileDescriptor_user_23985c8245c722d0 = []byte{ - // 562 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0x4d, 0x6f, 0xd3, 0x40, - 0x10, 0x95, 0xed, 0x24, 0x8d, 0x27, 0x6a, 0x92, 0xae, 0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, 0x36, 0x3e, 0xf2, 0x3e, 0x41, 0x36, 0x3e, 0x7a, 0x4b, 0x70, - 0x6f, 0xd4, 0x56, 0xed, 0xb5, 0x29, 0x44, 0x2d, 0xa5, 0x56, 0x23, 0xa5, 0xed, 0xa5, 0xf0, 0x7e, - 0x5b, 0x70, 0x11, 0x24, 0x22, 0xcc, 0x5b, 0xbe, 0x28, 0x6b, 0x61, 0xcd, 0x2a, 0x59, 0x6b, 0x4b, - 0xc1, 0xc9, 0xae, 0xf3, 0x84, 0xdd, 0x4e, 0xbb, 0xdd, 0x6e, 0xab, 0xdd, 0x5e, 0xd3, 0xee, 0x59, - 0x61, 0xf7, 0x74, 0xff, 0xfe, 0x5f, 0x5a, 0xc9, 0x6d, 0xfa, 0x1e, 0x83, 0x13, 0x48, 0xc1, 0x21, - 0x2f, 0x66, 0x20, 0xc5, 0xe2, 0xa7, 0x0d, 0x34, 0xa1, 0xd8, 0x7b, 0x18, 0x6c, 0x4f, 0x5d, 0xc6, - 0x2e, 0xf3, 0xce, 0xa8, 0xb6, 0xf8, 0xe4, 0x59, 0x0b, 0x9a, 0x25, 0xec, 0x0a, 0x86, 0xd5, 0xbc, - 0xb1, 0x17, 0x87, 0xc6, 0xaa, 0x67, 0x73, 0xd2, 0x78, 0x6e, 0x46, 0xb8, 0x34, 0x67, 0x0a, 0xe1, - 0xea, 0xe8, 0x29, 0x84, 0xeb, 0xb3, 0x6f, 0x49, 0x8f, 0xb0, 0xf4, 0xcc, 0x0b, 0xe1, 0xc6, 0x24, - 0x99, 0xf0, 0xf6, 0x8d, 0x2c, 0xf9, 0x78, 0xfe, 0x75, 0x30, 0xa7, 0x89, 0x7d, 0x65, 0x3e, 0x9b, - 0x1e, 0xcd, 0xed, 0x77, 0x7f, 0x02, 0x00, 0x00, 0xff, 0xff, 0x30, 0xbd, 0x59, 0x5b, 0xca, 0x05, - 0x00, 0x00, +func init() { proto.RegisterFile("user/user.proto", fileDescriptor_user_2aac409c3ed42d0b) } + +var fileDescriptor_user_2aac409c3ed42d0b = []byte{ + // 796 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xc4, 0x56, 0xcb, 0x6e, 0xdb, 0x3a, + 0x10, 0x85, 0xfc, 0x8a, 0x35, 0x46, 0xec, 0x84, 0xc8, 0x83, 0xf0, 0xcd, 0x0d, 0x7c, 0x89, 0x8b, + 0xc2, 0x9b, 0xa6, 0x45, 0xba, 0x6b, 0x56, 0xad, 0xdd, 0x1a, 0x46, 0x12, 0x18, 0x55, 0xe1, 0x4d, + 0x57, 0x55, 0xac, 0x89, 0x23, 0xd4, 0x16, 0x55, 0x49, 0x0e, 0x02, 0xf4, 0x03, 0xba, 0x2e, 0xba, + 0xe8, 0x6f, 0xf4, 0xd7, 0xfa, 0x07, 0x05, 0x49, 0xcb, 0xa2, 0x1e, 0x76, 0x82, 0xb6, 0x40, 0x37, + 0x02, 0xe7, 0x90, 0x3c, 0xc3, 0x33, 0x33, 0xe4, 0x08, 0x5a, 0x8b, 0x10, 0x83, 0x27, 0xe2, 0x73, + 0xe2, 0x07, 0x3c, 0xe2, 0xa4, 0x22, 0xc6, 0xec, 0x35, 0x40, 0x8f, 0xcf, 0xe7, 0xdc, 0xb3, 0x30, + 0xf4, 0xc9, 0x11, 0x98, 0x18, 0x04, 0x3c, 0xe8, 0x71, 0x07, 0xa9, 0xd1, 0x31, 0xba, 0x55, 0x2b, + 0x01, 0x48, 0x1b, 0xea, 0xd2, 0xb8, 0x0c, 0xa7, 0xb4, 0xd4, 0x31, 0xba, 0xa6, 0xb5, 0xb2, 0x99, + 0x0b, 0xad, 0x3e, 0xce, 0x30, 0xc2, 0x71, 0x88, 0x41, 0x28, 0xc9, 0x9e, 0x02, 0x4c, 0x56, 0xd4, + 0x92, 0xad, 0x71, 0xba, 0x73, 0x22, 0x4f, 0x90, 0xb8, 0xb4, 0xb4, 0x35, 0xe4, 0x7f, 0xd8, 0xbe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7d, 0x32, 0x86, 0xbd, 0xa2, 0x6b, 0x4c, 0xfe, 0x55, 0x3b, 0xd6, 0xbc, 0x35, 0xed, + 0xe3, 0x4d, 0xd3, 0x8a, 0x76, 0xb0, 0x81, 0x76, 0xb0, 0x99, 0x76, 0xed, 0xb5, 0xb0, 0xe5, 0x95, + 0x29, 0xac, 0x24, 0xf2, 0x9f, 0xae, 0xb1, 0xb0, 0x7a, 0xdb, 0xec, 0xbe, 0x25, 0xa1, 0xff, 0x72, + 0xfb, 0x5d, 0xe3, 0x44, 0xfe, 0x10, 0x9e, 0x89, 0xcf, 0x55, 0x4d, 0xfe, 0x16, 0x3e, 0xfb, 0x19, + 0x00, 0x00, 0xff, 0xff, 0xac, 0xcf, 0xd3, 0x1b, 0x29, 0x0a, 0x00, 0x00, } diff --git a/pkg/proto/user/user.proto b/pkg/proto/user/user.proto index 883ab5d73..2e9c98e39 100644 --- a/pkg/proto/user/user.proto +++ b/pkg/proto/user/user.proto @@ -65,11 +65,55 @@ message UpdateUserInfoReq{ string Uid = 10; } +message SetReceiveMessageOptReq{ + string uId = 1; + int32 opt = 2; + repeated string conversationId = 3; + string operationID = 4; +} + +message SetReceiveMessageOptResp{ + int32 errCode = 1; + string errMsg = 2; + repeated OptResult optResult = 3; +} + + +message GetReceiveMessageOptReq{ + string uId = 1; + repeated string conversationId = 2; + string operationID = 3; +} + +message OptResult{ + string conversationId = 1; + int32 result = 2; //-1: failed; 0:default; 1: not receive ; 2: not jpush +} + +message GetReceiveMessageOptResp{ + int32 errCode = 1; + string errMsg = 2; + repeated OptResult conversationOptResult = 3; +} + +message GetAllConversationMsgOptReq{ + string uId = 1; + string operationID = 2; +} + +message GetAllConversationMsgOptResp{ + int32 errCode = 1; + string errMsg = 2; + repeated OptResult conversationOptResult = 3; +} + service user { rpc getUserInfo(GetUserInfoReq) returns(GetUserInfoResp); rpc UpdateUserInfo(UpdateUserInfoReq) returns(CommonResp); rpc DeleteUsers(DeleteUsersReq)returns(DeleteUsersResp); rpc GetAllUsersUid(GetAllUsersUidReq)returns(GetAllUsersUidResp); - + rpc SetReceiveMessageOpt(SetReceiveMessageOptReq)returns(SetReceiveMessageOptResp); + rpc GetReceiveMessageOpt(GetReceiveMessageOptReq)returns(GetReceiveMessageOptResp); + rpc GetAllConversationMsgOpt(GetAllConversationMsgOptReq)returns(GetAllConversationMsgOptResp); }