浏览代码

接口新增

WH01243 3 年之前
父节点
当前提交
a85c80d02b

+ 0 - 30
rpc/messagecenter/internal/logic/pinglogic.go

@@ -1,30 +0,0 @@
-package logic
-
-import (
-	"context"
-
-	"messagecenter/rpc/messagecenter/internal/svc"
-	"messagecenter/rpc/messagecenter/messagecenter"
-
-	"github.com/zeromicro/go-zero/core/logx"
-)
-
-type PingLogic struct {
-	ctx    context.Context
-	svcCtx *svc.ServiceContext
-	logx.Logger
-}
-
-func NewPingLogic(ctx context.Context, svcCtx *svc.ServiceContext) *PingLogic {
-	return &PingLogic{
-		ctx:    ctx,
-		svcCtx: svcCtx,
-		Logger: logx.WithContext(ctx),
-	}
-}
-
-func (l *PingLogic) Ping(in *messagecenter.Request) (*messagecenter.Response, error) {
-	// todo: add your logic here and delete this line
-
-	return &messagecenter.Response{}, nil
-}

+ 27 - 8
rpc/messagecenter/internal/server/messagecenterserver.go

@@ -1,5 +1,5 @@
 // Code generated by goctl. DO NOT EDIT!
-// Source: messagecenter.proto
+// Source: messageCenter.proto
 
 package server
 
@@ -11,18 +11,37 @@ import (
 	"messagecenter/rpc/messagecenter/messagecenter"
 )
 
-type MessagecenterServer struct {
+type MessageCenterServer struct {
 	svcCtx *svc.ServiceContext
-	messagecenter.UnimplementedMessagecenterServer
+	messagecenter.UnimplementedMessageCenterServer
 }
 
-func NewMessagecenterServer(svcCtx *svc.ServiceContext) *MessagecenterServer {
-	return &MessagecenterServer{
+func NewMessageCenterServer(svcCtx *svc.ServiceContext) *MessageCenterServer {
+	return &MessageCenterServer{
 		svcCtx: svcCtx,
 	}
 }
 
-func (s *MessagecenterServer) Ping(ctx context.Context, in *messagecenter.Request) (*messagecenter.Response, error) {
-	l := logic.NewPingLogic(ctx, s.svcCtx)
-	return l.Ping(in)
+//  查询数量
+func (s *MessageCenterServer) Count(ctx context.Context, in *messagecenter.CountReq) (*messagecenter.CountResp, error) {
+	l := logic.NewCountLogic(ctx, s.svcCtx)
+	return l.Count(in)
+}
+
+//  获取消息
+func (s *MessageCenterServer) GetLast(ctx context.Context, in *messagecenter.GetReq) (*messagecenter.GetResp, error) {
+	l := logic.NewGetLastLogic(ctx, s.svcCtx)
+	return l.GetLast(in)
+}
+
+//  用户列表查询
+func (s *MessageCenterServer) UserList(ctx context.Context, in *messagecenter.UserReq) (*messagecenter.UserResp, error) {
+	l := logic.NewUserListLogic(ctx, s.svcCtx)
+	return l.UserList(in)
+}
+
+//  聊天内容查询
+func (s *MessageCenterServer) FindMessage(ctx context.Context, in *messagecenter.MessageReq) (*messagecenter.MessageResp, error) {
+	l := logic.NewFindMessageLogic(ctx, s.svcCtx)
+	return l.FindMessage(in)
 }

+ 2 - 2
rpc/messagecenter/messagecenter.go

@@ -24,10 +24,10 @@ func main() {
 	var c config.Config
 	conf.MustLoad(*configFile, &c)
 	ctx := svc.NewServiceContext(c)
-	svr := server.NewMessagecenterServer(ctx)
+	svr := server.NewMessageCenterServer(ctx)
 
 	s := zrpc.MustNewServer(c.RpcServerConf, func(grpcServer *grpc.Server) {
-		messagecenter.RegisterMessagecenterServer(grpcServer, svr)
+		messagecenter.RegisterMessageCenterServer(grpcServer, svr)
 
 		if c.Mode == service.DevMode || c.Mode == service.TestMode {
 			reflection.Register(grpcServer)

+ 58 - 6
rpc/messagecenter/messagecenter.proto

@@ -3,14 +3,66 @@ syntax = "proto3";
 package messagecenter;
 option go_package="./messagecenter";
 
-message Request {
-  string ping = 1;
+message CountReq {
+  int64 readType = 1;    // 已读类型
+  int64 msgType = 2;     // 消息类型
+  string sendId = 3;     // 发送方id
+  string receiveId = 4;  // 接收方id
 }
 
-message Response {
-  string pong = 1;
+message CountResp {
+  int64 count = 1;
+}
+message GetReq {
+  int64 msgType = 1;     // 消息类型
+  string sendId = 2;     // 发送方id
+  string receiveId = 3;  // 接收方id
+}
+
+message GetResp {
+  string content = 1;
+  string createTime = 2;
 }
 
-service Messagecenter {
-  rpc Ping(Request) returns(Response);
+message UserReq {
+  string phone = 1;
+  string startTime = 2;
+  string endTime = 3;
+  string customer_service_id = 4;
+}
+message UserResp {
+  string userId = 1;
+  string nickName= 2;
+}
+message MessageReq {
+  string type = 1;
+  int64 pageIndex = 2;
+  int64 pageSize = 3;
+  string send_user_id = 4;
+  string own_id = 5;
 }
+message MessageResp {
+  int64 count = 1;
+  MessageEntity data= 2;
+}
+message MessageEntity {
+  string title = 1;
+  string content = 2;
+  string item = 3;
+  string type = 4;
+  string link = 5;
+  string create_time = 6;
+}
+service messageCenter {
+  // 查询数量
+  rpc Count(CountReq) returns (CountResp);
+  // 获取消息
+  rpc GetLast(GetReq)   returns (GetResp);
+  // 用户列表查询
+  rpc UserList(UserReq) returns(UserResp);
+  // 聊天内容查询
+  rpc FindMessage(MessageReq) returns(MessageResp);
+
+
+
+}

+ 35 - 9
rpc/messagecenter/messagecenter/messagecenter.go

@@ -1,5 +1,5 @@
 // Code generated by goctl. DO NOT EDIT!
-// Source: messagecenter.proto
+// Source: messageCenter.proto
 
 package messagecenter
 
@@ -11,22 +11,48 @@ import (
 )
 
 type (
-	Messagecenter interface {
-		Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
+	MessageCenter interface {
+		//  查询数量
+		Count(ctx context.Context, in *CountReq, opts ...grpc.CallOption) (*CountResp, error)
+		//  获取消息
+		GetLast(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*GetResp, error)
+		//  用户列表查询
+		UserList(ctx context.Context, in *UserReq, opts ...grpc.CallOption) (*UserResp, error)
+		//  聊天内容查询
+		FindMessage(ctx context.Context, in *MessageReq, opts ...grpc.CallOption) (*MessageResp, error)
 	}
 
-	defaultMessagecenter struct {
+	defaultMessageCenter struct {
 		cli zrpc.Client
 	}
 )
 
-func NewMessagecenter(cli zrpc.Client) Messagecenter {
-	return &defaultMessagecenter{
+func NewMessageCenter(cli zrpc.Client) MessageCenter {
+	return &defaultMessageCenter{
 		cli: cli,
 	}
 }
 
-func (m *defaultMessagecenter) Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
-	client := NewMessagecenterClient(m.cli.Conn())
-	return client.Ping(ctx, in, opts...)
+//  查询数量
+func (m *defaultMessageCenter) Count(ctx context.Context, in *CountReq, opts ...grpc.CallOption) (*CountResp, error) {
+	client := NewMessageCenterClient(m.cli.Conn())
+	return client.Count(ctx, in, opts...)
+}
+
+//  获取消息
+func (m *defaultMessageCenter) GetLast(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*GetResp, error) {
+	client := NewMessageCenterClient(m.cli.Conn())
+	return client.GetLast(ctx, in, opts...)
+}
+
+//  用户列表查询
+func (m *defaultMessageCenter) UserList(ctx context.Context, in *UserReq, opts ...grpc.CallOption) (*UserResp, error) {
+	client := NewMessageCenterClient(m.cli.Conn())
+	return client.UserList(ctx, in, opts...)
+}
+
+//  聊天内容查询
+func (m *defaultMessageCenter) FindMessage(ctx context.Context, in *MessageReq, opts ...grpc.CallOption) (*MessageResp, error) {
+	client := NewMessageCenterClient(m.cli.Conn())
+	return client.FindMessage(ctx, in, opts...)
 }

+ 730 - 78
rpc/messagecenter/messagecenter/messagecenter.pb.go

@@ -1,8 +1,8 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
 // 	protoc-gen-go v1.28.0
-// 	protoc        v3.19.4
-// source: messagecenter.proto
+// 	protoc        v3.15.1
+// source: messageCenter.proto
 
 package messagecenter
 
@@ -20,31 +20,34 @@ const (
 	_ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20)
 )
 
-type Request struct {
+type CountReq struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	Ping string `protobuf:"bytes,1,opt,name=ping,proto3" json:"ping,omitempty"`
+	ReadType  int64  `protobuf:"varint,1,opt,name=readType,proto3" json:"readType,omitempty"`  // 已读类型
+	MsgType   int64  `protobuf:"varint,2,opt,name=msgType,proto3" json:"msgType,omitempty"`    // 消息类型
+	SendId    string `protobuf:"bytes,3,opt,name=sendId,proto3" json:"sendId,omitempty"`       // 发送方id
+	ReceiveId string `protobuf:"bytes,4,opt,name=receiveId,proto3" json:"receiveId,omitempty"` // 接收方id
 }
 
-func (x *Request) Reset() {
-	*x = Request{}
+func (x *CountReq) Reset() {
+	*x = CountReq{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_messagecenter_proto_msgTypes[0]
+		mi := &file_messageCenter_proto_msgTypes[0]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
 }
 
-func (x *Request) String() string {
+func (x *CountReq) String() string {
 	return protoimpl.X.MessageStringOf(x)
 }
 
-func (*Request) ProtoMessage() {}
+func (*CountReq) ProtoMessage() {}
 
-func (x *Request) ProtoReflect() protoreflect.Message {
-	mi := &file_messagecenter_proto_msgTypes[0]
+func (x *CountReq) ProtoReflect() protoreflect.Message {
+	mi := &file_messageCenter_proto_msgTypes[0]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -55,43 +58,113 @@ func (x *Request) ProtoReflect() protoreflect.Message {
 	return mi.MessageOf(x)
 }
 
-// Deprecated: Use Request.ProtoReflect.Descriptor instead.
-func (*Request) Descriptor() ([]byte, []int) {
-	return file_messagecenter_proto_rawDescGZIP(), []int{0}
+// Deprecated: Use CountReq.ProtoReflect.Descriptor instead.
+func (*CountReq) Descriptor() ([]byte, []int) {
+	return file_messageCenter_proto_rawDescGZIP(), []int{0}
 }
 
-func (x *Request) GetPing() string {
+func (x *CountReq) GetReadType() int64 {
 	if x != nil {
-		return x.Ping
+		return x.ReadType
+	}
+	return 0
+}
+
+func (x *CountReq) GetMsgType() int64 {
+	if x != nil {
+		return x.MsgType
+	}
+	return 0
+}
+
+func (x *CountReq) GetSendId() string {
+	if x != nil {
+		return x.SendId
+	}
+	return ""
+}
+
+func (x *CountReq) GetReceiveId() string {
+	if x != nil {
+		return x.ReceiveId
 	}
 	return ""
 }
 
-type Response struct {
+type CountResp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Count int64 `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
+}
+
+func (x *CountResp) Reset() {
+	*x = CountResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_messageCenter_proto_msgTypes[1]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *CountResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*CountResp) ProtoMessage() {}
+
+func (x *CountResp) ProtoReflect() protoreflect.Message {
+	mi := &file_messageCenter_proto_msgTypes[1]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use CountResp.ProtoReflect.Descriptor instead.
+func (*CountResp) Descriptor() ([]byte, []int) {
+	return file_messageCenter_proto_rawDescGZIP(), []int{1}
+}
+
+func (x *CountResp) GetCount() int64 {
+	if x != nil {
+		return x.Count
+	}
+	return 0
+}
+
+type GetReq struct {
 	state         protoimpl.MessageState
 	sizeCache     protoimpl.SizeCache
 	unknownFields protoimpl.UnknownFields
 
-	Pong string `protobuf:"bytes,1,opt,name=pong,proto3" json:"pong,omitempty"`
+	MsgType   int64  `protobuf:"varint,1,opt,name=msgType,proto3" json:"msgType,omitempty"`    // 消息类型
+	SendId    string `protobuf:"bytes,2,opt,name=sendId,proto3" json:"sendId,omitempty"`       // 发送方id
+	ReceiveId string `protobuf:"bytes,3,opt,name=receiveId,proto3" json:"receiveId,omitempty"` // 接收方id
 }
 
-func (x *Response) Reset() {
-	*x = Response{}
+func (x *GetReq) Reset() {
+	*x = GetReq{}
 	if protoimpl.UnsafeEnabled {
-		mi := &file_messagecenter_proto_msgTypes[1]
+		mi := &file_messageCenter_proto_msgTypes[2]
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		ms.StoreMessageInfo(mi)
 	}
 }
 
-func (x *Response) String() string {
+func (x *GetReq) String() string {
 	return protoimpl.X.MessageStringOf(x)
 }
 
-func (*Response) ProtoMessage() {}
+func (*GetReq) ProtoMessage() {}
 
-func (x *Response) ProtoReflect() protoreflect.Message {
-	mi := &file_messagecenter_proto_msgTypes[1]
+func (x *GetReq) ProtoReflect() protoreflect.Message {
+	mi := &file_messageCenter_proto_msgTypes[2]
 	if protoimpl.UnsafeEnabled && x != nil {
 		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
 		if ms.LoadMessageInfo() == nil {
@@ -102,71 +175,650 @@ func (x *Response) ProtoReflect() protoreflect.Message {
 	return mi.MessageOf(x)
 }
 
-// Deprecated: Use Response.ProtoReflect.Descriptor instead.
-func (*Response) Descriptor() ([]byte, []int) {
-	return file_messagecenter_proto_rawDescGZIP(), []int{1}
+// Deprecated: Use GetReq.ProtoReflect.Descriptor instead.
+func (*GetReq) Descriptor() ([]byte, []int) {
+	return file_messageCenter_proto_rawDescGZIP(), []int{2}
+}
+
+func (x *GetReq) GetMsgType() int64 {
+	if x != nil {
+		return x.MsgType
+	}
+	return 0
 }
 
-func (x *Response) GetPong() string {
+func (x *GetReq) GetSendId() string {
 	if x != nil {
-		return x.Pong
+		return x.SendId
 	}
 	return ""
 }
 
-var File_messagecenter_proto protoreflect.FileDescriptor
+func (x *GetReq) GetReceiveId() string {
+	if x != nil {
+		return x.ReceiveId
+	}
+	return ""
+}
+
+type GetResp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
 
-var file_messagecenter_proto_rawDesc = []byte{
-	0x0a, 0x13, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e,
+	Content    string `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
+	CreateTime string `protobuf:"bytes,2,opt,name=createTime,proto3" json:"createTime,omitempty"`
+}
+
+func (x *GetResp) Reset() {
+	*x = GetResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_messageCenter_proto_msgTypes[3]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *GetResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetResp) ProtoMessage() {}
+
+func (x *GetResp) ProtoReflect() protoreflect.Message {
+	mi := &file_messageCenter_proto_msgTypes[3]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use GetResp.ProtoReflect.Descriptor instead.
+func (*GetResp) Descriptor() ([]byte, []int) {
+	return file_messageCenter_proto_rawDescGZIP(), []int{3}
+}
+
+func (x *GetResp) GetContent() string {
+	if x != nil {
+		return x.Content
+	}
+	return ""
+}
+
+func (x *GetResp) GetCreateTime() string {
+	if x != nil {
+		return x.CreateTime
+	}
+	return ""
+}
+
+type UserReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Phone             string `protobuf:"bytes,1,opt,name=phone,proto3" json:"phone,omitempty"`
+	StartTime         string `protobuf:"bytes,2,opt,name=startTime,proto3" json:"startTime,omitempty"`
+	EndTime           string `protobuf:"bytes,3,opt,name=endTime,proto3" json:"endTime,omitempty"`
+	CustomerServiceId string `protobuf:"bytes,4,opt,name=customer_service_id,json=customerServiceId,proto3" json:"customer_service_id,omitempty"`
+}
+
+func (x *UserReq) Reset() {
+	*x = UserReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_messageCenter_proto_msgTypes[4]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *UserReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserReq) ProtoMessage() {}
+
+func (x *UserReq) ProtoReflect() protoreflect.Message {
+	mi := &file_messageCenter_proto_msgTypes[4]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserReq.ProtoReflect.Descriptor instead.
+func (*UserReq) Descriptor() ([]byte, []int) {
+	return file_messageCenter_proto_rawDescGZIP(), []int{4}
+}
+
+func (x *UserReq) GetPhone() string {
+	if x != nil {
+		return x.Phone
+	}
+	return ""
+}
+
+func (x *UserReq) GetStartTime() string {
+	if x != nil {
+		return x.StartTime
+	}
+	return ""
+}
+
+func (x *UserReq) GetEndTime() string {
+	if x != nil {
+		return x.EndTime
+	}
+	return ""
+}
+
+func (x *UserReq) GetCustomerServiceId() string {
+	if x != nil {
+		return x.CustomerServiceId
+	}
+	return ""
+}
+
+type UserResp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	UserId   string `protobuf:"bytes,1,opt,name=userId,proto3" json:"userId,omitempty"`
+	NickName string `protobuf:"bytes,2,opt,name=nickName,proto3" json:"nickName,omitempty"`
+}
+
+func (x *UserResp) Reset() {
+	*x = UserResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_messageCenter_proto_msgTypes[5]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *UserResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*UserResp) ProtoMessage() {}
+
+func (x *UserResp) ProtoReflect() protoreflect.Message {
+	mi := &file_messageCenter_proto_msgTypes[5]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use UserResp.ProtoReflect.Descriptor instead.
+func (*UserResp) Descriptor() ([]byte, []int) {
+	return file_messageCenter_proto_rawDescGZIP(), []int{5}
+}
+
+func (x *UserResp) GetUserId() string {
+	if x != nil {
+		return x.UserId
+	}
+	return ""
+}
+
+func (x *UserResp) GetNickName() string {
+	if x != nil {
+		return x.NickName
+	}
+	return ""
+}
+
+type MessageReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Type       string `protobuf:"bytes,1,opt,name=type,proto3" json:"type,omitempty"`
+	PageIndex  int64  `protobuf:"varint,2,opt,name=pageIndex,proto3" json:"pageIndex,omitempty"`
+	PageSize   int64  `protobuf:"varint,3,opt,name=pageSize,proto3" json:"pageSize,omitempty"`
+	SendUserId string `protobuf:"bytes,4,opt,name=send_user_id,json=sendUserId,proto3" json:"send_user_id,omitempty"`
+	OwnId      string `protobuf:"bytes,5,opt,name=own_id,json=ownId,proto3" json:"own_id,omitempty"`
+}
+
+func (x *MessageReq) Reset() {
+	*x = MessageReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_messageCenter_proto_msgTypes[6]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *MessageReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MessageReq) ProtoMessage() {}
+
+func (x *MessageReq) ProtoReflect() protoreflect.Message {
+	mi := &file_messageCenter_proto_msgTypes[6]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use MessageReq.ProtoReflect.Descriptor instead.
+func (*MessageReq) Descriptor() ([]byte, []int) {
+	return file_messageCenter_proto_rawDescGZIP(), []int{6}
+}
+
+func (x *MessageReq) GetType() string {
+	if x != nil {
+		return x.Type
+	}
+	return ""
+}
+
+func (x *MessageReq) GetPageIndex() int64 {
+	if x != nil {
+		return x.PageIndex
+	}
+	return 0
+}
+
+func (x *MessageReq) GetPageSize() int64 {
+	if x != nil {
+		return x.PageSize
+	}
+	return 0
+}
+
+func (x *MessageReq) GetSendUserId() string {
+	if x != nil {
+		return x.SendUserId
+	}
+	return ""
+}
+
+func (x *MessageReq) GetOwnId() string {
+	if x != nil {
+		return x.OwnId
+	}
+	return ""
+}
+
+type MessageResp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Count int64          `protobuf:"varint,1,opt,name=count,proto3" json:"count,omitempty"`
+	Data  *MessageEntity `protobuf:"bytes,2,opt,name=data,proto3" json:"data,omitempty"`
+}
+
+func (x *MessageResp) Reset() {
+	*x = MessageResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_messageCenter_proto_msgTypes[7]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *MessageResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MessageResp) ProtoMessage() {}
+
+func (x *MessageResp) ProtoReflect() protoreflect.Message {
+	mi := &file_messageCenter_proto_msgTypes[7]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use MessageResp.ProtoReflect.Descriptor instead.
+func (*MessageResp) Descriptor() ([]byte, []int) {
+	return file_messageCenter_proto_rawDescGZIP(), []int{7}
+}
+
+func (x *MessageResp) GetCount() int64 {
+	if x != nil {
+		return x.Count
+	}
+	return 0
+}
+
+func (x *MessageResp) GetData() *MessageEntity {
+	if x != nil {
+		return x.Data
+	}
+	return nil
+}
+
+type MessageEntity struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Title      string `protobuf:"bytes,1,opt,name=title,proto3" json:"title,omitempty"`
+	Content    string `protobuf:"bytes,2,opt,name=content,proto3" json:"content,omitempty"`
+	Item       string `protobuf:"bytes,3,opt,name=item,proto3" json:"item,omitempty"`
+	Type       string `protobuf:"bytes,4,opt,name=type,proto3" json:"type,omitempty"`
+	Link       string `protobuf:"bytes,5,opt,name=link,proto3" json:"link,omitempty"`
+	CreateTime string `protobuf:"bytes,6,opt,name=create_time,json=createTime,proto3" json:"create_time,omitempty"`
+}
+
+func (x *MessageEntity) Reset() {
+	*x = MessageEntity{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_messageCenter_proto_msgTypes[8]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *MessageEntity) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*MessageEntity) ProtoMessage() {}
+
+func (x *MessageEntity) ProtoReflect() protoreflect.Message {
+	mi := &file_messageCenter_proto_msgTypes[8]
+	if protoimpl.UnsafeEnabled && x != nil {
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		if ms.LoadMessageInfo() == nil {
+			ms.StoreMessageInfo(mi)
+		}
+		return ms
+	}
+	return mi.MessageOf(x)
+}
+
+// Deprecated: Use MessageEntity.ProtoReflect.Descriptor instead.
+func (*MessageEntity) Descriptor() ([]byte, []int) {
+	return file_messageCenter_proto_rawDescGZIP(), []int{8}
+}
+
+func (x *MessageEntity) GetTitle() string {
+	if x != nil {
+		return x.Title
+	}
+	return ""
+}
+
+func (x *MessageEntity) GetContent() string {
+	if x != nil {
+		return x.Content
+	}
+	return ""
+}
+
+func (x *MessageEntity) GetItem() string {
+	if x != nil {
+		return x.Item
+	}
+	return ""
+}
+
+func (x *MessageEntity) GetType() string {
+	if x != nil {
+		return x.Type
+	}
+	return ""
+}
+
+func (x *MessageEntity) GetLink() string {
+	if x != nil {
+		return x.Link
+	}
+	return ""
+}
+
+func (x *MessageEntity) GetCreateTime() string {
+	if x != nil {
+		return x.CreateTime
+	}
+	return ""
+}
+
+var File_messageCenter_proto protoreflect.FileDescriptor
+
+var file_messageCenter_proto_rawDesc = []byte{
+	0x0a, 0x13, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e,
 	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65,
-	0x6e, 0x74, 0x65, 0x72, 0x22, 0x1d, 0x0a, 0x07, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12,
-	0x12, 0x0a, 0x04, 0x70, 0x69, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70,
-	0x69, 0x6e, 0x67, 0x22, 0x1e, 0x0a, 0x08, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12,
-	0x12, 0x0a, 0x04, 0x70, 0x6f, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70,
-	0x6f, 0x6e, 0x67, 0x32, 0x48, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65,
-	0x6e, 0x74, 0x65, 0x72, 0x12, 0x37, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x16, 0x2e, 0x6d,
-	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x71,
-	0x75, 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65,
-	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x42, 0x11, 0x5a,
-	0x0f, 0x2e, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72,
-	0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x6e, 0x74, 0x65, 0x72, 0x22, 0x76, 0x0a, 0x08, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71,
+	0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x08, 0x72, 0x65, 0x61, 0x64, 0x54, 0x79, 0x70, 0x65, 0x12, 0x18, 0x0a, 0x07,
+	0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d,
+	0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x64,
+	0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x1c,
+	0x0a, 0x09, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28,
+	0x09, 0x52, 0x09, 0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x49, 0x64, 0x22, 0x21, 0x0a, 0x09,
+	0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a, 0x05, 0x63, 0x6f, 0x75,
+	0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x22,
+	0x58, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67,
+	0x54, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x54,
+	0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x18, 0x02, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x65, 0x6e, 0x64, 0x49, 0x64, 0x12, 0x1c, 0x0a, 0x09, 0x72,
+	0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09,
+	0x72, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x49, 0x64, 0x22, 0x43, 0x0a, 0x07, 0x47, 0x65, 0x74,
+	0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x1e,
+	0x0a, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x69, 0x6d, 0x65, 0x22, 0x87,
+	0x01, 0x0a, 0x07, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68,
+	0x6f, 0x6e, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65,
+	0x12, 0x1c, 0x0a, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x02, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x74, 0x61, 0x72, 0x74, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x18,
+	0x0a, 0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x07, 0x65, 0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2e, 0x0a, 0x13, 0x63, 0x75, 0x73, 0x74,
+	0x6f, 0x6d, 0x65, 0x72, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x5f, 0x69, 0x64, 0x18,
+	0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x11, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x65, 0x72, 0x53,
+	0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0x3e, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72,
+	0x52, 0x65, 0x73, 0x70, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x18, 0x01,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x75, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x1a, 0x0a, 0x08,
+	0x6e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08,
+	0x6e, 0x69, 0x63, 0x6b, 0x4e, 0x61, 0x6d, 0x65, 0x22, 0x93, 0x01, 0x0a, 0x0a, 0x4d, 0x65, 0x73,
+	0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18,
+	0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1c, 0x0a, 0x09, 0x70,
+	0x61, 0x67, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09,
+	0x70, 0x61, 0x67, 0x65, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x61, 0x67,
+	0x65, 0x53, 0x69, 0x7a, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x70, 0x61, 0x67,
+	0x65, 0x53, 0x69, 0x7a, 0x65, 0x12, 0x20, 0x0a, 0x0c, 0x73, 0x65, 0x6e, 0x64, 0x5f, 0x75, 0x73,
+	0x65, 0x72, 0x5f, 0x69, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x73, 0x65, 0x6e,
+	0x64, 0x55, 0x73, 0x65, 0x72, 0x49, 0x64, 0x12, 0x15, 0x0a, 0x06, 0x6f, 0x77, 0x6e, 0x5f, 0x69,
+	0x64, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x49, 0x64, 0x22, 0x55,
+	0x0a, 0x0b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x14, 0x0a,
+	0x05, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x63, 0x6f,
+	0x75, 0x6e, 0x74, 0x12, 0x30, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28,
+	0x0b, 0x32, 0x1c, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65,
+	0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x52,
+	0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x9c, 0x01, 0x0a, 0x0d, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
+	0x65, 0x45, 0x6e, 0x74, 0x69, 0x74, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x74, 0x69, 0x74, 0x6c, 0x65, 0x12, 0x18, 0x0a,
+	0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
+	0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x69, 0x74, 0x65, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x74,
+	0x79, 0x70, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12,
+	0x12, 0x0a, 0x04, 0x6c, 0x69, 0x6e, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6c,
+	0x69, 0x6e, 0x6b, 0x12, 0x1f, 0x0a, 0x0b, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65, 0x5f, 0x74, 0x69,
+	0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x63, 0x72, 0x65, 0x61, 0x74, 0x65,
+	0x54, 0x69, 0x6d, 0x65, 0x32, 0x88, 0x02, 0x0a, 0x0d, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+	0x43, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x12, 0x3a, 0x0a, 0x05, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x12,
+	0x17, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e,
+	0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61,
+	0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x75, 0x6e, 0x74, 0x52, 0x65,
+	0x73, 0x70, 0x12, 0x38, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x4c, 0x61, 0x73, 0x74, 0x12, 0x15, 0x2e,
+	0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x47, 0x65,
+	0x74, 0x52, 0x65, 0x71, 0x1a, 0x16, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65,
+	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x3b, 0x0a, 0x08,
+	0x55, 0x73, 0x65, 0x72, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61,
+	0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x71,
+	0x1a, 0x17, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72,
+	0x2e, 0x55, 0x73, 0x65, 0x72, 0x52, 0x65, 0x73, 0x70, 0x12, 0x44, 0x0a, 0x0b, 0x46, 0x69, 0x6e,
+	0x64, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x19, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61,
+	0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+	0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e,
+	0x74, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x42,
+	0x11, 0x5a, 0x0f, 0x2e, 0x2f, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74,
+	0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
-	file_messagecenter_proto_rawDescOnce sync.Once
-	file_messagecenter_proto_rawDescData = file_messagecenter_proto_rawDesc
+	file_messageCenter_proto_rawDescOnce sync.Once
+	file_messageCenter_proto_rawDescData = file_messageCenter_proto_rawDesc
 )
 
-func file_messagecenter_proto_rawDescGZIP() []byte {
-	file_messagecenter_proto_rawDescOnce.Do(func() {
-		file_messagecenter_proto_rawDescData = protoimpl.X.CompressGZIP(file_messagecenter_proto_rawDescData)
+func file_messageCenter_proto_rawDescGZIP() []byte {
+	file_messageCenter_proto_rawDescOnce.Do(func() {
+		file_messageCenter_proto_rawDescData = protoimpl.X.CompressGZIP(file_messageCenter_proto_rawDescData)
 	})
-	return file_messagecenter_proto_rawDescData
+	return file_messageCenter_proto_rawDescData
 }
 
-var file_messagecenter_proto_msgTypes = make([]protoimpl.MessageInfo, 2)
-var file_messagecenter_proto_goTypes = []interface{}{
-	(*Request)(nil),  // 0: messagecenter.Request
-	(*Response)(nil), // 1: messagecenter.Response
+var file_messageCenter_proto_msgTypes = make([]protoimpl.MessageInfo, 9)
+var file_messageCenter_proto_goTypes = []interface{}{
+	(*CountReq)(nil),      // 0: messagecenter.CountReq
+	(*CountResp)(nil),     // 1: messagecenter.CountResp
+	(*GetReq)(nil),        // 2: messagecenter.GetReq
+	(*GetResp)(nil),       // 3: messagecenter.GetResp
+	(*UserReq)(nil),       // 4: messagecenter.UserReq
+	(*UserResp)(nil),      // 5: messagecenter.UserResp
+	(*MessageReq)(nil),    // 6: messagecenter.MessageReq
+	(*MessageResp)(nil),   // 7: messagecenter.MessageResp
+	(*MessageEntity)(nil), // 8: messagecenter.MessageEntity
 }
-var file_messagecenter_proto_depIdxs = []int32{
-	0, // 0: messagecenter.Messagecenter.Ping:input_type -> messagecenter.Request
-	1, // 1: messagecenter.Messagecenter.Ping:output_type -> messagecenter.Response
-	1, // [1:2] is the sub-list for method output_type
-	0, // [0:1] is the sub-list for method input_type
-	0, // [0:0] is the sub-list for extension type_name
-	0, // [0:0] is the sub-list for extension extendee
-	0, // [0:0] is the sub-list for field type_name
+var file_messageCenter_proto_depIdxs = []int32{
+	8, // 0: messagecenter.MessageResp.data:type_name -> messagecenter.MessageEntity
+	0, // 1: messagecenter.messageCenter.Count:input_type -> messagecenter.CountReq
+	2, // 2: messagecenter.messageCenter.GetLast:input_type -> messagecenter.GetReq
+	4, // 3: messagecenter.messageCenter.UserList:input_type -> messagecenter.UserReq
+	6, // 4: messagecenter.messageCenter.FindMessage:input_type -> messagecenter.MessageReq
+	1, // 5: messagecenter.messageCenter.Count:output_type -> messagecenter.CountResp
+	3, // 6: messagecenter.messageCenter.GetLast:output_type -> messagecenter.GetResp
+	5, // 7: messagecenter.messageCenter.UserList:output_type -> messagecenter.UserResp
+	7, // 8: messagecenter.messageCenter.FindMessage:output_type -> messagecenter.MessageResp
+	5, // [5:9] is the sub-list for method output_type
+	1, // [1:5] is the sub-list for method input_type
+	1, // [1:1] is the sub-list for extension type_name
+	1, // [1:1] is the sub-list for extension extendee
+	0, // [0:1] is the sub-list for field type_name
 }
 
-func init() { file_messagecenter_proto_init() }
-func file_messagecenter_proto_init() {
-	if File_messagecenter_proto != nil {
+func init() { file_messageCenter_proto_init() }
+func file_messageCenter_proto_init() {
+	if File_messageCenter_proto != nil {
 		return
 	}
 	if !protoimpl.UnsafeEnabled {
-		file_messagecenter_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*Request); i {
+		file_messageCenter_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CountReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_messageCenter_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*CountResp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_messageCenter_proto_msgTypes[2].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*GetReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_messageCenter_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*GetResp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_messageCenter_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UserReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_messageCenter_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*UserResp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_messageCenter_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*MessageReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_messageCenter_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*MessageResp); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -177,8 +829,8 @@ func file_messagecenter_proto_init() {
 				return nil
 			}
 		}
-		file_messagecenter_proto_msgTypes[1].Exporter = func(v interface{}, i int) interface{} {
-			switch v := v.(*Response); i {
+		file_messageCenter_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*MessageEntity); i {
 			case 0:
 				return &v.state
 			case 1:
@@ -194,18 +846,18 @@ func file_messagecenter_proto_init() {
 	out := protoimpl.TypeBuilder{
 		File: protoimpl.DescBuilder{
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
-			RawDescriptor: file_messagecenter_proto_rawDesc,
+			RawDescriptor: file_messageCenter_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   2,
+			NumMessages:   9,
 			NumExtensions: 0,
 			NumServices:   1,
 		},
-		GoTypes:           file_messagecenter_proto_goTypes,
-		DependencyIndexes: file_messagecenter_proto_depIdxs,
-		MessageInfos:      file_messagecenter_proto_msgTypes,
+		GoTypes:           file_messageCenter_proto_goTypes,
+		DependencyIndexes: file_messageCenter_proto_depIdxs,
+		MessageInfos:      file_messageCenter_proto_msgTypes,
 	}.Build()
-	File_messagecenter_proto = out.File
-	file_messagecenter_proto_rawDesc = nil
-	file_messagecenter_proto_goTypes = nil
-	file_messagecenter_proto_depIdxs = nil
+	File_messageCenter_proto = out.File
+	file_messageCenter_proto_rawDesc = nil
+	file_messageCenter_proto_goTypes = nil
+	file_messageCenter_proto_depIdxs = nil
 }

+ 155 - 39
rpc/messagecenter/messagecenter/messagecenter_grpc.pb.go

@@ -1,8 +1,8 @@
 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
 // versions:
 // - protoc-gen-go-grpc v1.2.0
-// - protoc             v3.19.4
-// source: messagecenter.proto
+// - protoc             v3.15.1
+// source: messageCenter.proto
 
 package messagecenter
 
@@ -18,88 +18,204 @@ import (
 // Requires gRPC-Go v1.32.0 or later.
 const _ = grpc.SupportPackageIsVersion7
 
-// MessagecenterClient is the client API for Messagecenter service.
+// MessageCenterClient is the client API for MessageCenter service.
 //
 // For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
-type MessagecenterClient interface {
-	Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error)
+type MessageCenterClient interface {
+	// 查询数量
+	Count(ctx context.Context, in *CountReq, opts ...grpc.CallOption) (*CountResp, error)
+	// 获取消息
+	GetLast(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*GetResp, error)
+	// 用户列表查询
+	UserList(ctx context.Context, in *UserReq, opts ...grpc.CallOption) (*UserResp, error)
+	// 聊天内容查询
+	FindMessage(ctx context.Context, in *MessageReq, opts ...grpc.CallOption) (*MessageResp, error)
 }
 
-type messagecenterClient struct {
+type messageCenterClient struct {
 	cc grpc.ClientConnInterface
 }
 
-func NewMessagecenterClient(cc grpc.ClientConnInterface) MessagecenterClient {
-	return &messagecenterClient{cc}
+func NewMessageCenterClient(cc grpc.ClientConnInterface) MessageCenterClient {
+	return &messageCenterClient{cc}
 }
 
-func (c *messagecenterClient) Ping(ctx context.Context, in *Request, opts ...grpc.CallOption) (*Response, error) {
-	out := new(Response)
-	err := c.cc.Invoke(ctx, "/messagecenter.Messagecenter/Ping", in, out, opts...)
+func (c *messageCenterClient) Count(ctx context.Context, in *CountReq, opts ...grpc.CallOption) (*CountResp, error) {
+	out := new(CountResp)
+	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/Count", in, out, opts...)
 	if err != nil {
 		return nil, err
 	}
 	return out, nil
 }
 
-// MessagecenterServer is the server API for Messagecenter service.
-// All implementations must embed UnimplementedMessagecenterServer
+func (c *messageCenterClient) GetLast(ctx context.Context, in *GetReq, opts ...grpc.CallOption) (*GetResp, error) {
+	out := new(GetResp)
+	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/GetLast", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *messageCenterClient) UserList(ctx context.Context, in *UserReq, opts ...grpc.CallOption) (*UserResp, error) {
+	out := new(UserResp)
+	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/UserList", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *messageCenterClient) FindMessage(ctx context.Context, in *MessageReq, opts ...grpc.CallOption) (*MessageResp, error) {
+	out := new(MessageResp)
+	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/FindMessage", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+// MessageCenterServer is the server API for MessageCenter service.
+// All implementations must embed UnimplementedMessageCenterServer
 // for forward compatibility
-type MessagecenterServer interface {
-	Ping(context.Context, *Request) (*Response, error)
-	mustEmbedUnimplementedMessagecenterServer()
+type MessageCenterServer interface {
+	// 查询数量
+	Count(context.Context, *CountReq) (*CountResp, error)
+	// 获取消息
+	GetLast(context.Context, *GetReq) (*GetResp, error)
+	// 用户列表查询
+	UserList(context.Context, *UserReq) (*UserResp, error)
+	// 聊天内容查询
+	FindMessage(context.Context, *MessageReq) (*MessageResp, error)
+	mustEmbedUnimplementedMessageCenterServer()
 }
 
-// UnimplementedMessagecenterServer must be embedded to have forward compatible implementations.
-type UnimplementedMessagecenterServer struct {
+// UnimplementedMessageCenterServer must be embedded to have forward compatible implementations.
+type UnimplementedMessageCenterServer struct {
 }
 
-func (UnimplementedMessagecenterServer) Ping(context.Context, *Request) (*Response, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented")
+func (UnimplementedMessageCenterServer) Count(context.Context, *CountReq) (*CountResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method Count not implemented")
+}
+func (UnimplementedMessageCenterServer) GetLast(context.Context, *GetReq) (*GetResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method GetLast not implemented")
+}
+func (UnimplementedMessageCenterServer) UserList(context.Context, *UserReq) (*UserResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UserList not implemented")
+}
+func (UnimplementedMessageCenterServer) FindMessage(context.Context, *MessageReq) (*MessageResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method FindMessage not implemented")
 }
-func (UnimplementedMessagecenterServer) mustEmbedUnimplementedMessagecenterServer() {}
+func (UnimplementedMessageCenterServer) mustEmbedUnimplementedMessageCenterServer() {}
 
-// UnsafeMessagecenterServer may be embedded to opt out of forward compatibility for this service.
-// Use of this interface is not recommended, as added methods to MessagecenterServer will
+// UnsafeMessageCenterServer may be embedded to opt out of forward compatibility for this service.
+// Use of this interface is not recommended, as added methods to MessageCenterServer will
 // result in compilation errors.
-type UnsafeMessagecenterServer interface {
-	mustEmbedUnimplementedMessagecenterServer()
+type UnsafeMessageCenterServer interface {
+	mustEmbedUnimplementedMessageCenterServer()
+}
+
+func RegisterMessageCenterServer(s grpc.ServiceRegistrar, srv MessageCenterServer) {
+	s.RegisterService(&MessageCenter_ServiceDesc, srv)
+}
+
+func _MessageCenter_Count_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(CountReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(MessageCenterServer).Count(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/messagecenter.messageCenter/Count",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(MessageCenterServer).Count(ctx, req.(*CountReq))
+	}
+	return interceptor(ctx, in, info, handler)
 }
 
-func RegisterMessagecenterServer(s grpc.ServiceRegistrar, srv MessagecenterServer) {
-	s.RegisterService(&Messagecenter_ServiceDesc, srv)
+func _MessageCenter_GetLast_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(GetReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(MessageCenterServer).GetLast(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/messagecenter.messageCenter/GetLast",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(MessageCenterServer).GetLast(ctx, req.(*GetReq))
+	}
+	return interceptor(ctx, in, info, handler)
 }
 
-func _Messagecenter_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(Request)
+func _MessageCenter_UserList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UserReq)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
 	if interceptor == nil {
-		return srv.(MessagecenterServer).Ping(ctx, in)
+		return srv.(MessageCenterServer).UserList(ctx, in)
 	}
 	info := &grpc.UnaryServerInfo{
 		Server:     srv,
-		FullMethod: "/messagecenter.Messagecenter/Ping",
+		FullMethod: "/messagecenter.messageCenter/UserList",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(MessagecenterServer).Ping(ctx, req.(*Request))
+		return srv.(MessageCenterServer).UserList(ctx, req.(*UserReq))
 	}
 	return interceptor(ctx, in, info, handler)
 }
 
-// Messagecenter_ServiceDesc is the grpc.ServiceDesc for Messagecenter service.
+func _MessageCenter_FindMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(MessageReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(MessageCenterServer).FindMessage(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/messagecenter.messageCenter/FindMessage",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(MessageCenterServer).FindMessage(ctx, req.(*MessageReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+// MessageCenter_ServiceDesc is the grpc.ServiceDesc for MessageCenter service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
-var Messagecenter_ServiceDesc = grpc.ServiceDesc{
-	ServiceName: "messagecenter.Messagecenter",
-	HandlerType: (*MessagecenterServer)(nil),
+var MessageCenter_ServiceDesc = grpc.ServiceDesc{
+	ServiceName: "messagecenter.messageCenter",
+	HandlerType: (*MessageCenterServer)(nil),
 	Methods: []grpc.MethodDesc{
 		{
-			MethodName: "Ping",
-			Handler:    _Messagecenter_Ping_Handler,
+			MethodName: "Count",
+			Handler:    _MessageCenter_Count_Handler,
+		},
+		{
+			MethodName: "GetLast",
+			Handler:    _MessageCenter_GetLast_Handler,
+		},
+		{
+			MethodName: "UserList",
+			Handler:    _MessageCenter_UserList_Handler,
+		},
+		{
+			MethodName: "FindMessage",
+			Handler:    _MessageCenter_FindMessage_Handler,
 		},
 	},
 	Streams:  []grpc.StreamDesc{},
-	Metadata: "messagecenter.proto",
+	Metadata: "messageCenter.proto",
 }