renjiaojiao преди 2 години
родител
ревизия
bfd2e1a77c

+ 6 - 2
rpc/messagecenter/init/init.go

@@ -3,10 +3,15 @@ package init
 import (
 	"app.yhyue.com/moapp/jybase/mongodb"
 	"app.yhyue.com/moapp/jybase/mysql"
+	"app.yhyue.com/moapp/jybase/redis"
 	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/entity"
 	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/internal/config"
 	"flag"
 	_ "github.com/go-sql-driver/mysql"
+	"github.com/zeromicro/go-zero/core/conf"
+	"github.com/zeromicro/go-zero/core/logx"
+	"log"
+	"strings"
 )
 
 var (
@@ -24,7 +29,7 @@ var logc entity.Logc
 var dbFile = flag.String("df", "etc/db.yaml", "the db file")
 var DB config.Db
 
-/*func init() {
+func init() {
 	conf.MustLoad(*configF, &C)
 	//初始化日志信息
 	conf.MustLoad(*logFile, &logc)
@@ -82,4 +87,3 @@ var DB config.Db
 	}
 	SurvivalTime = C.SurvivalTime
 }
-*/

+ 13 - 7
rpc/messagecenter/internal/server/messagecenterserver.go

@@ -1,4 +1,4 @@
-// Code generated by goctl. DO NOT EDIT.
+// Code generated by goctl. DO NOT EDIT!
 // Source: messagecenter.proto
 
 package server
@@ -22,37 +22,37 @@ func NewMessageCenterServer(svcCtx *svc.ServiceContext) *MessageCenterServer {
 	}
 }
 
-// 查询数量
+//  查询数量
 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) 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)
 }
 
-// 聊天保存
+//  聊天保存
 func (s *MessageCenterServer) SaveMessage(ctx context.Context, in *messagecenter.MessageEntity) (*messagecenter.SaveMessageResp, error) {
 	l := logic.NewSaveMessageLogic(ctx, s.svcCtx)
 	return l.SaveMessage(in)
 }
 
-// 会话创建
+//  会话创建
 func (s *MessageCenterServer) CreateChatSession(ctx context.Context, in *messagecenter.ChatSessionReq) (*messagecenter.ChatSessionResp, error) {
 	l := logic.NewCreateChatSessionLogic(ctx, s.svcCtx)
 	return l.CreateChatSession(in)
 }
 
-// 会话关闭
+//  会话关闭
 func (s *MessageCenterServer) CloseChatSession(ctx context.Context, in *messagecenter.CloseSessionReq) (*messagecenter.ChatSessionResp, error) {
 	l := logic.NewCloseChatSessionLogic(ctx, s.svcCtx)
 	return l.CloseChatSession(in)
@@ -117,3 +117,9 @@ func (s *MessageCenterServer) GroupNoticeGet(ctx context.Context, in *messagecen
 	l := logic.NewGroupNoticeGetLogic(ctx, s.svcCtx)
 	return l.GroupNoticeGet(in)
 }
+
+// 通讯录 -企业人员列表
+func (s *MessageCenterServer) EntPersonsList(ctx context.Context, in *messagecenter.EntPersonsListReq) (*messagecenter.EntPersonListResp, error) {
+	l := logic.NewEntPersonsListLogic(ctx, s.svcCtx)
+	return l.EntPersonsList(in)
+}

+ 26 - 0
rpc/messagecenter/messagecenter.proto

@@ -198,6 +198,30 @@ message  GroupNotice{
   string content = 1;
   string  groupNoticeId = 2;
 }
+//企业人员列表、拉人进群列表
+message EntPersonsListReq{
+  string name =1;
+  int64 entId = 2;
+  int64 GroupId = 3;
+}
+message PersonInfo{
+  int64 id = 1;
+  string personName = 2;
+  string phone = 3;
+  string email = 4;
+  int64 positionId = 5;
+}
+message departmentsInfo{
+  int64 id = 1;
+  string departmentName = 2;
+  repeated PersonInfo persons = 3;//部门下的人
+}
+message EntPersonListResp{
+  int64         error_code = 1; //响应代码
+  string        error_msg = 2; //响应消息
+  repeated departmentsInfo data = 3; //返回数据
+  string entName = 4;
+}
 
 service messageCenter {
   // 查询数量
@@ -232,4 +256,6 @@ service messageCenter {
   rpc GroupNoticeUpdate(GroupNoticeUpdateReq)returns(CommonReq);
   //群任务详情
   rpc GroupNoticeGet(ChatGroupPersonReq)returns(GroupNoticeGetResp);
+  //通讯录 -企业人员列表
+  rpc EntPersonsList(EntPersonsListReq) returns(EntPersonListResp);
 }

+ 73 - 1
rpc/messagecenter/messagecenter/messagecenter.go

@@ -1,5 +1,5 @@
 // Code generated by goctl. DO NOT EDIT!
-// Source: messageCenter.proto
+// Source: messagecenter.proto
 
 package messagecenter
 
@@ -28,6 +28,24 @@ type (
 		SaveAutoReplyMsg(ctx context.Context, in *SaveAutoReplyReq, opts ...grpc.CallOption) (*MessageResp, error)
 		// 根据消息修改已读状态
 		UpdateReadById(ctx context.Context, in *ReadStateReq, opts ...grpc.CallOption) (*CurrencyResp, error)
+		// 群组列表查询
+		ChatGroupList(ctx context.Context, in *ChatGroupListReq, opts ...grpc.CallOption) (*ChatGroupListResp, error)
+		// 群组新增
+		ChatGroupAdd(ctx context.Context, in *ChatGroupAddReq, opts ...grpc.CallOption) (*CommonReq, error)
+		// 群组成员查询
+		ChatGroupPerson(ctx context.Context, in *ChatGroupPersonReq, opts ...grpc.CallOption) (*ChatGroupPersonResp, error)
+		// 加入群组
+		ChatGroupJoin(ctx context.Context, in *ChatGroupJoinReq, opts ...grpc.CallOption) (*CommonReq, error)
+		// 群组名称修改
+		GroupNameUpdate(ctx context.Context, in *GroupNameUpdateReq, opts ...grpc.CallOption) (*CommonReq, error)
+		// 群任务新增
+		GroupNoticeAdd(ctx context.Context, in *GroupNoticeAddReq, opts ...grpc.CallOption) (*CommonReq, error)
+		// 群任务编辑
+		GroupNoticeUpdate(ctx context.Context, in *GroupNoticeUpdateReq, opts ...grpc.CallOption) (*CommonReq, error)
+		// 群任务详情
+		GroupNoticeGet(ctx context.Context, in *ChatGroupPersonReq, opts ...grpc.CallOption) (*GroupNoticeGetResp, error)
+		// 通讯录 -企业人员列表
+		EntPersonsList(ctx context.Context, in *EntPersonsListReq, opts ...grpc.CallOption) (*EntPersonListResp, error)
 	}
 
 	defaultMessageCenter struct {
@@ -88,3 +106,57 @@ func (m *defaultMessageCenter) UpdateReadById(ctx context.Context, in *ReadState
 	client := NewMessageCenterClient(m.cli.Conn())
 	return client.UpdateReadById(ctx, in, opts...)
 }
+
+// 群组列表查询
+func (m *defaultMessageCenter) ChatGroupList(ctx context.Context, in *ChatGroupListReq, opts ...grpc.CallOption) (*ChatGroupListResp, error) {
+	client := NewMessageCenterClient(m.cli.Conn())
+	return client.ChatGroupList(ctx, in, opts...)
+}
+
+// 群组新增
+func (m *defaultMessageCenter) ChatGroupAdd(ctx context.Context, in *ChatGroupAddReq, opts ...grpc.CallOption) (*CommonReq, error) {
+	client := NewMessageCenterClient(m.cli.Conn())
+	return client.ChatGroupAdd(ctx, in, opts...)
+}
+
+// 群组成员查询
+func (m *defaultMessageCenter) ChatGroupPerson(ctx context.Context, in *ChatGroupPersonReq, opts ...grpc.CallOption) (*ChatGroupPersonResp, error) {
+	client := NewMessageCenterClient(m.cli.Conn())
+	return client.ChatGroupPerson(ctx, in, opts...)
+}
+
+// 加入群组
+func (m *defaultMessageCenter) ChatGroupJoin(ctx context.Context, in *ChatGroupJoinReq, opts ...grpc.CallOption) (*CommonReq, error) {
+	client := NewMessageCenterClient(m.cli.Conn())
+	return client.ChatGroupJoin(ctx, in, opts...)
+}
+
+// 群组名称修改
+func (m *defaultMessageCenter) GroupNameUpdate(ctx context.Context, in *GroupNameUpdateReq, opts ...grpc.CallOption) (*CommonReq, error) {
+	client := NewMessageCenterClient(m.cli.Conn())
+	return client.GroupNameUpdate(ctx, in, opts...)
+}
+
+// 群任务新增
+func (m *defaultMessageCenter) GroupNoticeAdd(ctx context.Context, in *GroupNoticeAddReq, opts ...grpc.CallOption) (*CommonReq, error) {
+	client := NewMessageCenterClient(m.cli.Conn())
+	return client.GroupNoticeAdd(ctx, in, opts...)
+}
+
+// 群任务编辑
+func (m *defaultMessageCenter) GroupNoticeUpdate(ctx context.Context, in *GroupNoticeUpdateReq, opts ...grpc.CallOption) (*CommonReq, error) {
+	client := NewMessageCenterClient(m.cli.Conn())
+	return client.GroupNoticeUpdate(ctx, in, opts...)
+}
+
+// 群任务详情
+func (m *defaultMessageCenter) GroupNoticeGet(ctx context.Context, in *ChatGroupPersonReq, opts ...grpc.CallOption) (*GroupNoticeGetResp, error) {
+	client := NewMessageCenterClient(m.cli.Conn())
+	return client.GroupNoticeGet(ctx, in, opts...)
+}
+
+// 通讯录 -企业人员列表
+func (m *defaultMessageCenter) EntPersonsList(ctx context.Context, in *EntPersonsListReq, opts ...grpc.CallOption) (*EntPersonListResp, error) {
+	client := NewMessageCenterClient(m.cli.Conn())
+	return client.EntPersonsList(ctx, in, opts...)
+}

+ 491 - 120
rpc/messagecenter/messagecenter/messagecenter.pb.go

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go. DO NOT EDIT.
 // versions:
-// 	protoc-gen-go v1.28.1
-// 	protoc        v3.15.1
+// 	protoc-gen-go v1.28.0
+// 	protoc        v3.19.4
 // source: messagecenter.proto
 
 package messagecenter
@@ -2254,6 +2254,283 @@ func (x *GroupNotice) GetGroupNoticeId() string {
 	return ""
 }
 
+//企业人员列表、拉人进群列表
+type EntPersonsListReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Name    string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"`
+	EntId   int64  `protobuf:"varint,2,opt,name=entId,proto3" json:"entId,omitempty"`
+	GroupId int64  `protobuf:"varint,3,opt,name=GroupId,proto3" json:"GroupId,omitempty"`
+}
+
+func (x *EntPersonsListReq) Reset() {
+	*x = EntPersonsListReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_messagecenter_proto_msgTypes[30]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *EntPersonsListReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*EntPersonsListReq) ProtoMessage() {}
+
+func (x *EntPersonsListReq) ProtoReflect() protoreflect.Message {
+	mi := &file_messagecenter_proto_msgTypes[30]
+	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 EntPersonsListReq.ProtoReflect.Descriptor instead.
+func (*EntPersonsListReq) Descriptor() ([]byte, []int) {
+	return file_messagecenter_proto_rawDescGZIP(), []int{30}
+}
+
+func (x *EntPersonsListReq) GetName() string {
+	if x != nil {
+		return x.Name
+	}
+	return ""
+}
+
+func (x *EntPersonsListReq) GetEntId() int64 {
+	if x != nil {
+		return x.EntId
+	}
+	return 0
+}
+
+func (x *EntPersonsListReq) GetGroupId() int64 {
+	if x != nil {
+		return x.GroupId
+	}
+	return 0
+}
+
+type PersonInfo struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Id         int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
+	PersonName string `protobuf:"bytes,2,opt,name=personName,proto3" json:"personName,omitempty"`
+	Phone      string `protobuf:"bytes,3,opt,name=phone,proto3" json:"phone,omitempty"`
+	Email      string `protobuf:"bytes,4,opt,name=email,proto3" json:"email,omitempty"`
+	PositionId int64  `protobuf:"varint,5,opt,name=positionId,proto3" json:"positionId,omitempty"`
+}
+
+func (x *PersonInfo) Reset() {
+	*x = PersonInfo{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_messagecenter_proto_msgTypes[31]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *PersonInfo) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*PersonInfo) ProtoMessage() {}
+
+func (x *PersonInfo) ProtoReflect() protoreflect.Message {
+	mi := &file_messagecenter_proto_msgTypes[31]
+	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 PersonInfo.ProtoReflect.Descriptor instead.
+func (*PersonInfo) Descriptor() ([]byte, []int) {
+	return file_messagecenter_proto_rawDescGZIP(), []int{31}
+}
+
+func (x *PersonInfo) GetId() int64 {
+	if x != nil {
+		return x.Id
+	}
+	return 0
+}
+
+func (x *PersonInfo) GetPersonName() string {
+	if x != nil {
+		return x.PersonName
+	}
+	return ""
+}
+
+func (x *PersonInfo) GetPhone() string {
+	if x != nil {
+		return x.Phone
+	}
+	return ""
+}
+
+func (x *PersonInfo) GetEmail() string {
+	if x != nil {
+		return x.Email
+	}
+	return ""
+}
+
+func (x *PersonInfo) GetPositionId() int64 {
+	if x != nil {
+		return x.PositionId
+	}
+	return 0
+}
+
+type DepartmentsInfo struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Id             int64         `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
+	DepartmentName string        `protobuf:"bytes,2,opt,name=departmentName,proto3" json:"departmentName,omitempty"`
+	Persons        []*PersonInfo `protobuf:"bytes,3,rep,name=persons,proto3" json:"persons,omitempty"` //部门下的人
+}
+
+func (x *DepartmentsInfo) Reset() {
+	*x = DepartmentsInfo{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_messagecenter_proto_msgTypes[32]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *DepartmentsInfo) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*DepartmentsInfo) ProtoMessage() {}
+
+func (x *DepartmentsInfo) ProtoReflect() protoreflect.Message {
+	mi := &file_messagecenter_proto_msgTypes[32]
+	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 DepartmentsInfo.ProtoReflect.Descriptor instead.
+func (*DepartmentsInfo) Descriptor() ([]byte, []int) {
+	return file_messagecenter_proto_rawDescGZIP(), []int{32}
+}
+
+func (x *DepartmentsInfo) GetId() int64 {
+	if x != nil {
+		return x.Id
+	}
+	return 0
+}
+
+func (x *DepartmentsInfo) GetDepartmentName() string {
+	if x != nil {
+		return x.DepartmentName
+	}
+	return ""
+}
+
+func (x *DepartmentsInfo) GetPersons() []*PersonInfo {
+	if x != nil {
+		return x.Persons
+	}
+	return nil
+}
+
+type EntPersonListResp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	ErrorCode int64              `protobuf:"varint,1,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` //响应代码
+	ErrorMsg  string             `protobuf:"bytes,2,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"`     //响应消息
+	Data      []*DepartmentsInfo `protobuf:"bytes,3,rep,name=data,proto3" json:"data,omitempty"`                             //返回数据
+	EntName   string             `protobuf:"bytes,4,opt,name=entName,proto3" json:"entName,omitempty"`
+}
+
+func (x *EntPersonListResp) Reset() {
+	*x = EntPersonListResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_messagecenter_proto_msgTypes[33]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *EntPersonListResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*EntPersonListResp) ProtoMessage() {}
+
+func (x *EntPersonListResp) ProtoReflect() protoreflect.Message {
+	mi := &file_messagecenter_proto_msgTypes[33]
+	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 EntPersonListResp.ProtoReflect.Descriptor instead.
+func (*EntPersonListResp) Descriptor() ([]byte, []int) {
+	return file_messagecenter_proto_rawDescGZIP(), []int{33}
+}
+
+func (x *EntPersonListResp) GetErrorCode() int64 {
+	if x != nil {
+		return x.ErrorCode
+	}
+	return 0
+}
+
+func (x *EntPersonListResp) GetErrorMsg() string {
+	if x != nil {
+		return x.ErrorMsg
+	}
+	return ""
+}
+
+func (x *EntPersonListResp) GetData() []*DepartmentsInfo {
+	if x != nil {
+		return x.Data
+	}
+	return nil
+}
+
+func (x *EntPersonListResp) GetEntName() string {
+	if x != nil {
+		return x.EntName
+	}
+	return ""
+}
+
 var File_messagecenter_proto protoreflect.FileDescriptor
 
 var file_messagecenter_proto_rawDesc = []byte{
@@ -2542,88 +2819,126 @@ var file_messagecenter_proto_rawDesc = []byte{
 	0x07, 0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07,
 	0x63, 0x6f, 0x6e, 0x74, 0x65, 0x6e, 0x74, 0x12, 0x24, 0x0a, 0x0d, 0x67, 0x72, 0x6f, 0x75, 0x70,
 	0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d,
-	0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x49, 0x64, 0x32, 0xee, 0x09,
-	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, 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, 0x12, 0x4b,
-	0x0a, 0x0b, 0x53, 0x61, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 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, 0x1a, 0x1e, 0x2e, 0x6d, 0x65,
-	0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x61, 0x76, 0x65,
-	0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, 0x52, 0x0a, 0x11, 0x43,
-	0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
-	0x12, 0x1d, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72,
-	0x2e, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a,
+	0x67, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x49, 0x64, 0x22, 0x57, 0x0a,
+	0x11, 0x45, 0x6e, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x4c, 0x69, 0x73, 0x74, 0x52,
+	0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x18,
+	0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07,
+	0x47, 0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x47,
+	0x72, 0x6f, 0x75, 0x70, 0x49, 0x64, 0x22, 0x88, 0x01, 0x0a, 0x0a, 0x50, 0x65, 0x72, 0x73, 0x6f,
+	0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28,
+	0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4e,
+	0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x73, 0x6f,
+	0x6e, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x18, 0x03,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x70, 0x68, 0x6f, 0x6e, 0x65, 0x12, 0x14, 0x0a, 0x05, 0x65,
+	0x6d, 0x61, 0x69, 0x6c, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x6d, 0x61, 0x69,
+	0x6c, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x18,
+	0x05, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x70, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49,
+	0x64, 0x22, 0x7e, 0x0a, 0x0f, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73,
+	0x49, 0x6e, 0x66, 0x6f, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03,
+	0x52, 0x02, 0x69, 0x64, 0x12, 0x26, 0x0a, 0x0e, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65,
+	0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x64, 0x65,
+	0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x33, 0x0a, 0x07,
+	0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e,
+	0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x50, 0x65,
+	0x72, 0x73, 0x6f, 0x6e, 0x49, 0x6e, 0x66, 0x6f, 0x52, 0x07, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e,
+	0x73, 0x22, 0x9d, 0x01, 0x0a, 0x11, 0x45, 0x6e, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4c,
+	0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72,
+	0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x72, 0x72,
+	0x6f, 0x72, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x1b, 0x0a, 0x09, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f,
+	0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72,
+	0x4d, 0x73, 0x67, 0x12, 0x32, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x03, 0x28,
+	0x0b, 0x32, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65,
+	0x72, 0x2e, 0x64, 0x65, 0x70, 0x61, 0x72, 0x74, 0x6d, 0x65, 0x6e, 0x74, 0x73, 0x49, 0x6e, 0x66,
+	0x6f, 0x52, 0x04, 0x64, 0x61, 0x74, 0x61, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x6e, 0x74, 0x4e, 0x61,
+	0x6d, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x65, 0x6e, 0x74, 0x4e, 0x61, 0x6d,
+	0x65, 0x32, 0xc4, 0x0a, 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,
+	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, 0x12, 0x4b, 0x0a, 0x0b, 0x53, 0x61, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
+	0x65, 0x12, 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, 0x1a,
 	0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e,
-	0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12,
-	0x52, 0x0a, 0x10, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73,
-	0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e,
-	0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
+	0x53, 0x61, 0x76, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12,
+	0x52, 0x0a, 0x11, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73,
+	0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1d, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65,
+	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e,
 	0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e,
 	0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x52,
-	0x65, 0x73, 0x70, 0x12, 0x4f, 0x0a, 0x10, 0x53, 0x61, 0x76, 0x65, 0x41, 0x75, 0x74, 0x6f, 0x52,
-	0x65, 0x70, 0x6c, 0x79, 0x4d, 0x73, 0x67, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
-	0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x61, 0x76, 0x65, 0x41, 0x75, 0x74, 0x6f,
-	0x52, 0x65, 0x70, 0x6c, 0x79, 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, 0x12, 0x4a, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65,
-	0x61, 0x64, 0x42, 0x79, 0x49, 0x64, 0x12, 0x1b, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
-	0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x53, 0x74, 0x61, 0x74, 0x65,
-	0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e,
-	0x74, 0x65, 0x72, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79, 0x52, 0x65, 0x73, 0x70,
-	0x12, 0x52, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73,
-	0x74, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65,
-	0x72, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74, 0x52,
-	0x65, 0x71, 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74,
-	0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c, 0x69, 0x73, 0x74,
-	0x52, 0x65, 0x73, 0x70, 0x12, 0x48, 0x0a, 0x0c, 0x43, 0x68, 0x61, 0x74, 0x47, 0x72, 0x6f, 0x75,
-	0x70, 0x41, 0x64, 0x64, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65,
-	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64,
-	0x64, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65,
-	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x58,
-	0x0a, 0x0f, 0x43, 0x68, 0x61, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x65, 0x72, 0x73, 0x6f,
-	0x6e, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65,
-	0x72, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x65, 0x72, 0x73, 0x6f,
-	0x6e, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65,
-	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x65,
-	0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4a, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x74,
-	0x47, 0x72, 0x6f, 0x75, 0x70, 0x4a, 0x6f, 0x69, 0x6e, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x73, 0x73,
-	0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x47, 0x72,
-	0x6f, 0x75, 0x70, 0x4a, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x6d, 0x65, 0x73,
-	0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
-	0x6e, 0x52, 0x65, 0x71, 0x12, 0x4e, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d,
-	0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
-	0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x61, 0x6d,
-	0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x6d, 0x65, 0x73,
-	0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f,
-	0x6e, 0x52, 0x65, 0x71, 0x12, 0x4c, 0x0a, 0x0e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x6f, 0x74,
-	0x69, 0x63, 0x65, 0x41, 0x64, 0x64, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
-	0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x6f, 0x74, 0x69,
-	0x63, 0x65, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61,
+	0x65, 0x73, 0x70, 0x12, 0x52, 0x0a, 0x10, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x43, 0x68, 0x61, 0x74,
+	0x53, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
+	0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6c, 0x6f, 0x73, 0x65, 0x53, 0x65, 0x73,
+	0x73, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
+	0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x53, 0x65, 0x73, 0x73,
+	0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4f, 0x0a, 0x10, 0x53, 0x61, 0x76, 0x65, 0x41,
+	0x75, 0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x4d, 0x73, 0x67, 0x12, 0x1f, 0x2e, 0x6d, 0x65,
+	0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x53, 0x61, 0x76, 0x65,
+	0x41, 0x75, 0x74, 0x6f, 0x52, 0x65, 0x70, 0x6c, 0x79, 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, 0x12, 0x4a, 0x0a, 0x0e, 0x55, 0x70, 0x64, 0x61,
+	0x74, 0x65, 0x52, 0x65, 0x61, 0x64, 0x42, 0x79, 0x49, 0x64, 0x12, 0x1b, 0x2e, 0x6d, 0x65, 0x73,
+	0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x53,
+	0x74, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1b, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
+	0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x75, 0x72, 0x72, 0x65, 0x6e, 0x63, 0x79,
+	0x52, 0x65, 0x73, 0x70, 0x12, 0x52, 0x0a, 0x0d, 0x43, 0x68, 0x61, 0x74, 0x47, 0x72, 0x6f, 0x75,
+	0x70, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63,
+	0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4c,
+	0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+	0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70,
+	0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x48, 0x0a, 0x0c, 0x43, 0x68, 0x61, 0x74,
+	0x47, 0x72, 0x6f, 0x75, 0x70, 0x41, 0x64, 0x64, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61,
+	0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x47, 0x72, 0x6f,
+	0x75, 0x70, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61,
 	0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52,
-	0x65, 0x71, 0x12, 0x52, 0x0a, 0x11, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x6f, 0x74, 0x69, 0x63,
-	0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
-	0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x6f, 0x74,
-	0x69, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x6d,
-	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d,
-	0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x56, 0x0a, 0x0e, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e,
-	0x6f, 0x74, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61,
+	0x65, 0x71, 0x12, 0x58, 0x0a, 0x0f, 0x43, 0x68, 0x61, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50,
+	0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63,
+	0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50,
+	0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61,
 	0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x47, 0x72, 0x6f,
-	0x75, 0x70, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x21, 0x2e, 0x6d, 0x65,
+	0x75, 0x70, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x4a, 0x0a, 0x0d,
+	0x43, 0x68, 0x61, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4a, 0x6f, 0x69, 0x6e, 0x12, 0x1f, 0x2e,
+	0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68,
+	0x61, 0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4a, 0x6f, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x18,
+	0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43,
+	0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x4e, 0x0a, 0x0f, 0x47, 0x72, 0x6f, 0x75,
+	0x70, 0x4e, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x21, 0x2e, 0x6d, 0x65,
+	0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x47, 0x72, 0x6f, 0x75,
+	0x70, 0x4e, 0x61, 0x6d, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x18,
+	0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43,
+	0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x4c, 0x0a, 0x0e, 0x47, 0x72, 0x6f, 0x75,
+	0x70, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x41, 0x64, 0x64, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x73,
+	0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x47, 0x72, 0x6f, 0x75, 0x70,
+	0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x41, 0x64, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x18, 0x2e, 0x6d,
+	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6d,
+	0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x52, 0x0a, 0x11, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e,
+	0x6f, 0x74, 0x69, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x12, 0x23, 0x2e, 0x6d, 0x65,
 	0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x47, 0x72, 0x6f, 0x75,
-	0x70, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 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,
+	0x70, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x52, 0x65, 0x71,
+	0x1a, 0x18, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72,
+	0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x12, 0x56, 0x0a, 0x0e, 0x47, 0x72,
+	0x6f, 0x75, 0x70, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x12, 0x21, 0x2e, 0x6d,
+	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61,
+	0x74, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a,
+	0x21, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e,
+	0x47, 0x72, 0x6f, 0x75, 0x70, 0x4e, 0x6f, 0x74, 0x69, 0x63, 0x65, 0x47, 0x65, 0x74, 0x52, 0x65,
+	0x73, 0x70, 0x12, 0x54, 0x0a, 0x0e, 0x45, 0x6e, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73,
+	0x4c, 0x69, 0x73, 0x74, 0x12, 0x20, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65,
+	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x6e, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x73, 0x4c,
+	0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+	0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x45, 0x6e, 0x74, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e,
+	0x4c, 0x69, 0x73, 0x74, 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 (
@@ -2638,7 +2953,7 @@ func file_messagecenter_proto_rawDescGZIP() []byte {
 	return file_messagecenter_proto_rawDescData
 }
 
-var file_messagecenter_proto_msgTypes = make([]protoimpl.MessageInfo, 31)
+var file_messagecenter_proto_msgTypes = make([]protoimpl.MessageInfo, 35)
 var file_messagecenter_proto_goTypes = []interface{}{
 	(*CountReq)(nil),             // 0: messagecenter.CountReq
 	(*CountResp)(nil),            // 1: messagecenter.CountResp
@@ -2670,7 +2985,11 @@ var file_messagecenter_proto_goTypes = []interface{}{
 	(*GroupNoticeUpdateReq)(nil), // 27: messagecenter.GroupNoticeUpdateReq
 	(*GroupNoticeGetResp)(nil),   // 28: messagecenter.GroupNoticeGetResp
 	(*GroupNotice)(nil),          // 29: messagecenter.GroupNotice
-	nil,                          // 30: messagecenter.ChatGroupPersonResp.DataEntry
+	(*EntPersonsListReq)(nil),    // 30: messagecenter.EntPersonsListReq
+	(*PersonInfo)(nil),           // 31: messagecenter.PersonInfo
+	(*DepartmentsInfo)(nil),      // 32: messagecenter.departmentsInfo
+	(*EntPersonListResp)(nil),    // 33: messagecenter.EntPersonListResp
+	nil,                          // 34: messagecenter.ChatGroupPersonResp.DataEntry
 }
 var file_messagecenter_proto_depIdxs = []int32{
 	8,  // 0: messagecenter.CountResp.lastMessage:type_name -> messagecenter.MessageEntity
@@ -2678,47 +2997,51 @@ var file_messagecenter_proto_depIdxs = []int32{
 	8,  // 2: messagecenter.MessageResp.data:type_name -> messagecenter.MessageEntity
 	8,  // 3: messagecenter.SaveMessageResp.data:type_name -> messagecenter.MessageEntity
 	17, // 4: messagecenter.ChatGroupListResp.data:type_name -> messagecenter.ChatGroupList
-	30, // 5: messagecenter.ChatGroupPersonResp.data:type_name -> messagecenter.ChatGroupPersonResp.DataEntry
+	34, // 5: messagecenter.ChatGroupPersonResp.data:type_name -> messagecenter.ChatGroupPersonResp.DataEntry
 	23, // 6: messagecenter.ChatGroupPersonList.data:type_name -> messagecenter.ChatGroupPerson
 	29, // 7: messagecenter.GroupNoticeGetResp.data:type_name -> messagecenter.GroupNotice
-	22, // 8: messagecenter.ChatGroupPersonResp.DataEntry.value:type_name -> messagecenter.ChatGroupPersonList
-	0,  // 9: messagecenter.messageCenter.Count:input_type -> messagecenter.CountReq
-	2,  // 10: messagecenter.messageCenter.UserList:input_type -> messagecenter.UserReq
-	5,  // 11: messagecenter.messageCenter.FindMessage:input_type -> messagecenter.MessageReq
-	8,  // 12: messagecenter.messageCenter.SaveMessage:input_type -> messagecenter.MessageEntity
-	9,  // 13: messagecenter.messageCenter.CreateChatSession:input_type -> messagecenter.ChatSessionReq
-	10, // 14: messagecenter.messageCenter.CloseChatSession:input_type -> messagecenter.CloseSessionReq
-	12, // 15: messagecenter.messageCenter.SaveAutoReplyMsg:input_type -> messagecenter.SaveAutoReplyReq
-	13, // 16: messagecenter.messageCenter.UpdateReadById:input_type -> messagecenter.ReadStateReq
-	15, // 17: messagecenter.messageCenter.ChatGroupList:input_type -> messagecenter.ChatGroupListReq
-	18, // 18: messagecenter.messageCenter.ChatGroupAdd:input_type -> messagecenter.ChatGroupAddReq
-	20, // 19: messagecenter.messageCenter.ChatGroupPerson:input_type -> messagecenter.ChatGroupPersonReq
-	24, // 20: messagecenter.messageCenter.ChatGroupJoin:input_type -> messagecenter.ChatGroupJoinReq
-	25, // 21: messagecenter.messageCenter.GroupNameUpdate:input_type -> messagecenter.GroupNameUpdateReq
-	26, // 22: messagecenter.messageCenter.GroupNoticeAdd:input_type -> messagecenter.GroupNoticeAddReq
-	27, // 23: messagecenter.messageCenter.GroupNoticeUpdate:input_type -> messagecenter.GroupNoticeUpdateReq
-	20, // 24: messagecenter.messageCenter.GroupNoticeGet:input_type -> messagecenter.ChatGroupPersonReq
-	1,  // 25: messagecenter.messageCenter.Count:output_type -> messagecenter.CountResp
-	3,  // 26: messagecenter.messageCenter.UserList:output_type -> messagecenter.UserResp
-	6,  // 27: messagecenter.messageCenter.FindMessage:output_type -> messagecenter.MessageResp
-	7,  // 28: messagecenter.messageCenter.SaveMessage:output_type -> messagecenter.SaveMessageResp
-	11, // 29: messagecenter.messageCenter.CreateChatSession:output_type -> messagecenter.ChatSessionResp
-	11, // 30: messagecenter.messageCenter.CloseChatSession:output_type -> messagecenter.ChatSessionResp
-	6,  // 31: messagecenter.messageCenter.SaveAutoReplyMsg:output_type -> messagecenter.MessageResp
-	14, // 32: messagecenter.messageCenter.UpdateReadById:output_type -> messagecenter.CurrencyResp
-	16, // 33: messagecenter.messageCenter.ChatGroupList:output_type -> messagecenter.ChatGroupListResp
-	19, // 34: messagecenter.messageCenter.ChatGroupAdd:output_type -> messagecenter.CommonReq
-	21, // 35: messagecenter.messageCenter.ChatGroupPerson:output_type -> messagecenter.ChatGroupPersonResp
-	19, // 36: messagecenter.messageCenter.ChatGroupJoin:output_type -> messagecenter.CommonReq
-	19, // 37: messagecenter.messageCenter.GroupNameUpdate:output_type -> messagecenter.CommonReq
-	19, // 38: messagecenter.messageCenter.GroupNoticeAdd:output_type -> messagecenter.CommonReq
-	19, // 39: messagecenter.messageCenter.GroupNoticeUpdate:output_type -> messagecenter.CommonReq
-	28, // 40: messagecenter.messageCenter.GroupNoticeGet:output_type -> messagecenter.GroupNoticeGetResp
-	25, // [25:41] is the sub-list for method output_type
-	9,  // [9:25] is the sub-list for method input_type
-	9,  // [9:9] is the sub-list for extension type_name
-	9,  // [9:9] is the sub-list for extension extendee
-	0,  // [0:9] is the sub-list for field type_name
+	31, // 8: messagecenter.departmentsInfo.persons:type_name -> messagecenter.PersonInfo
+	32, // 9: messagecenter.EntPersonListResp.data:type_name -> messagecenter.departmentsInfo
+	22, // 10: messagecenter.ChatGroupPersonResp.DataEntry.value:type_name -> messagecenter.ChatGroupPersonList
+	0,  // 11: messagecenter.messageCenter.Count:input_type -> messagecenter.CountReq
+	2,  // 12: messagecenter.messageCenter.UserList:input_type -> messagecenter.UserReq
+	5,  // 13: messagecenter.messageCenter.FindMessage:input_type -> messagecenter.MessageReq
+	8,  // 14: messagecenter.messageCenter.SaveMessage:input_type -> messagecenter.MessageEntity
+	9,  // 15: messagecenter.messageCenter.CreateChatSession:input_type -> messagecenter.ChatSessionReq
+	10, // 16: messagecenter.messageCenter.CloseChatSession:input_type -> messagecenter.CloseSessionReq
+	12, // 17: messagecenter.messageCenter.SaveAutoReplyMsg:input_type -> messagecenter.SaveAutoReplyReq
+	13, // 18: messagecenter.messageCenter.UpdateReadById:input_type -> messagecenter.ReadStateReq
+	15, // 19: messagecenter.messageCenter.ChatGroupList:input_type -> messagecenter.ChatGroupListReq
+	18, // 20: messagecenter.messageCenter.ChatGroupAdd:input_type -> messagecenter.ChatGroupAddReq
+	20, // 21: messagecenter.messageCenter.ChatGroupPerson:input_type -> messagecenter.ChatGroupPersonReq
+	24, // 22: messagecenter.messageCenter.ChatGroupJoin:input_type -> messagecenter.ChatGroupJoinReq
+	25, // 23: messagecenter.messageCenter.GroupNameUpdate:input_type -> messagecenter.GroupNameUpdateReq
+	26, // 24: messagecenter.messageCenter.GroupNoticeAdd:input_type -> messagecenter.GroupNoticeAddReq
+	27, // 25: messagecenter.messageCenter.GroupNoticeUpdate:input_type -> messagecenter.GroupNoticeUpdateReq
+	20, // 26: messagecenter.messageCenter.GroupNoticeGet:input_type -> messagecenter.ChatGroupPersonReq
+	30, // 27: messagecenter.messageCenter.EntPersonsList:input_type -> messagecenter.EntPersonsListReq
+	1,  // 28: messagecenter.messageCenter.Count:output_type -> messagecenter.CountResp
+	3,  // 29: messagecenter.messageCenter.UserList:output_type -> messagecenter.UserResp
+	6,  // 30: messagecenter.messageCenter.FindMessage:output_type -> messagecenter.MessageResp
+	7,  // 31: messagecenter.messageCenter.SaveMessage:output_type -> messagecenter.SaveMessageResp
+	11, // 32: messagecenter.messageCenter.CreateChatSession:output_type -> messagecenter.ChatSessionResp
+	11, // 33: messagecenter.messageCenter.CloseChatSession:output_type -> messagecenter.ChatSessionResp
+	6,  // 34: messagecenter.messageCenter.SaveAutoReplyMsg:output_type -> messagecenter.MessageResp
+	14, // 35: messagecenter.messageCenter.UpdateReadById:output_type -> messagecenter.CurrencyResp
+	16, // 36: messagecenter.messageCenter.ChatGroupList:output_type -> messagecenter.ChatGroupListResp
+	19, // 37: messagecenter.messageCenter.ChatGroupAdd:output_type -> messagecenter.CommonReq
+	21, // 38: messagecenter.messageCenter.ChatGroupPerson:output_type -> messagecenter.ChatGroupPersonResp
+	19, // 39: messagecenter.messageCenter.ChatGroupJoin:output_type -> messagecenter.CommonReq
+	19, // 40: messagecenter.messageCenter.GroupNameUpdate:output_type -> messagecenter.CommonReq
+	19, // 41: messagecenter.messageCenter.GroupNoticeAdd:output_type -> messagecenter.CommonReq
+	19, // 42: messagecenter.messageCenter.GroupNoticeUpdate:output_type -> messagecenter.CommonReq
+	28, // 43: messagecenter.messageCenter.GroupNoticeGet:output_type -> messagecenter.GroupNoticeGetResp
+	33, // 44: messagecenter.messageCenter.EntPersonsList:output_type -> messagecenter.EntPersonListResp
+	28, // [28:45] is the sub-list for method output_type
+	11, // [11:28] is the sub-list for method input_type
+	11, // [11:11] is the sub-list for extension type_name
+	11, // [11:11] is the sub-list for extension extendee
+	0,  // [0:11] is the sub-list for field type_name
 }
 
 func init() { file_messagecenter_proto_init() }
@@ -3087,6 +3410,54 @@ func file_messagecenter_proto_init() {
 				return nil
 			}
 		}
+		file_messagecenter_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*EntPersonsListReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_messagecenter_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*PersonInfo); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_messagecenter_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*DepartmentsInfo); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_messagecenter_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*EntPersonListResp); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
 	}
 	type x struct{}
 	out := protoimpl.TypeBuilder{
@@ -3094,7 +3465,7 @@ func file_messagecenter_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_messagecenter_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   31,
+			NumMessages:   35,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

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

@@ -1,7 +1,7 @@
 // Code generated by protoc-gen-go-grpc. DO NOT EDIT.
 // versions:
 // - protoc-gen-go-grpc v1.2.0
-// - protoc             v3.15.1
+// - protoc             v3.19.4
 // source: messagecenter.proto
 
 package messagecenter
@@ -54,6 +54,8 @@ type MessageCenterClient interface {
 	GroupNoticeUpdate(ctx context.Context, in *GroupNoticeUpdateReq, opts ...grpc.CallOption) (*CommonReq, error)
 	//群任务详情
 	GroupNoticeGet(ctx context.Context, in *ChatGroupPersonReq, opts ...grpc.CallOption) (*GroupNoticeGetResp, error)
+	//通讯录 -企业人员列表
+	EntPersonsList(ctx context.Context, in *EntPersonsListReq, opts ...grpc.CallOption) (*EntPersonListResp, error)
 }
 
 type messageCenterClient struct {
@@ -208,6 +210,15 @@ func (c *messageCenterClient) GroupNoticeGet(ctx context.Context, in *ChatGroupP
 	return out, nil
 }
 
+func (c *messageCenterClient) EntPersonsList(ctx context.Context, in *EntPersonsListReq, opts ...grpc.CallOption) (*EntPersonListResp, error) {
+	out := new(EntPersonListResp)
+	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/EntPersonsList", 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
@@ -244,6 +255,8 @@ type MessageCenterServer interface {
 	GroupNoticeUpdate(context.Context, *GroupNoticeUpdateReq) (*CommonReq, error)
 	//群任务详情
 	GroupNoticeGet(context.Context, *ChatGroupPersonReq) (*GroupNoticeGetResp, error)
+	//通讯录 -企业人员列表
+	EntPersonsList(context.Context, *EntPersonsListReq) (*EntPersonListResp, error)
 	mustEmbedUnimplementedMessageCenterServer()
 }
 
@@ -299,6 +312,9 @@ func (UnimplementedMessageCenterServer) GroupNoticeUpdate(context.Context, *Grou
 func (UnimplementedMessageCenterServer) GroupNoticeGet(context.Context, *ChatGroupPersonReq) (*GroupNoticeGetResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method GroupNoticeGet not implemented")
 }
+func (UnimplementedMessageCenterServer) EntPersonsList(context.Context, *EntPersonsListReq) (*EntPersonListResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method EntPersonsList not implemented")
+}
 func (UnimplementedMessageCenterServer) mustEmbedUnimplementedMessageCenterServer() {}
 
 // UnsafeMessageCenterServer may be embedded to opt out of forward compatibility for this service.
@@ -600,6 +616,24 @@ func _MessageCenter_GroupNoticeGet_Handler(srv interface{}, ctx context.Context,
 	return interceptor(ctx, in, info, handler)
 }
 
+func _MessageCenter_EntPersonsList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(EntPersonsListReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(MessageCenterServer).EntPersonsList(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/messagecenter.messageCenter/EntPersonsList",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(MessageCenterServer).EntPersonsList(ctx, req.(*EntPersonsListReq))
+	}
+	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)
@@ -671,6 +705,10 @@ var MessageCenter_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "GroupNoticeGet",
 			Handler:    _MessageCenter_GroupNoticeGet_Handler,
 		},
+		{
+			MethodName: "EntPersonsList",
+			Handler:    _MessageCenter_EntPersonsList_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "messagecenter.proto",

+ 59 - 0
service/ent_address_book.go

@@ -0,0 +1,59 @@
+package service
+
+import (
+	"app.yhyue.com/moapp/jybase/go-xweb/log"
+	IC "bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/init"
+	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/messagecenter"
+)
+
+func (b ChatGroupService) EntPersonsList(param *messagecenter.EntPersonsListReq) {
+	var sql string
+	if param.Name != "" {
+		sql = "SELECT a.id,a.pid,a.name,c.id as user_id,c.name as user_name,c.phone as user_phone,c.power as user_power,e.name as role from entniche_department a " +
+			"INNER JOIN entniche_department_user b on (a.ent_id=? and a.id=b.dept_id) " +
+			"INNER JOIN entniche_user c on (b.user_id=c.id and c.name like '%" + param.Name + "%') " +
+			"LEFT JOIN entniche_user_role d on (c.id=d.user_id) " +
+			"LEFT JOIN entniche_role e on (d.role_id=e.id) " +
+			"order by a.id,convert(c.name using gbk) COLLATE gbk_chinese_ci asc"
+	} else {
+		sql = `SELECT a.id,a.pid,a.name,c.id as user_id,c.name as user_name,c.phone as user_phone,c.power as user_power,e.name as role from entniche_department a 
+			INNER JOIN entniche_department_user b on (a.ent_id=? and a.id=b.dept_id) 
+			INNER JOIN entniche_user c on (b.user_id=c.id) 
+			LEFT JOIN entniche_user_role d on (c.id=d.user_id) 
+			LEFT JOIN entniche_role e on (d.role_id=e.id) 
+			order by a.id,convert(c.name using gbk) COLLATE gbk_chinese_ci asc`
+	}
+	data := IC.MainMysql.SelectBySql(sql, param.EntId)
+	if data != nil && len(*data) > 0 {
+		for _, v := range *data {
+			log.Println(v)
+			//id := cm.IntAll(v["id"])
+
+			/*user := map[string]interface{}{
+				"user_id":  cm.IntAll(v["user_id"]),
+				"power":    user_power,
+				"username": cm.ObjToString(v["user_name"]),
+				"phone":    cm.ObjToString(v["user_phone"]),
+				"role":     cm.ObjToString(v["role"]),
+			}
+			//log.Println("权限:", user_power)
+
+			list = append(list, map[string]interface{}{
+				"id":    id,
+				"pid":   cm.IntAll(v["pid"]),
+				"name":  cm.ObjToString(v["name"]),
+				"users": []map[string]interface{}{user},
+			})*/
+		}
+	}
+
+	//log.Println(checkedArr)
+	/*this.ServeJson(Result{Data: M{
+		"entname":     this.GetSession("entName"),
+		"checked":     checked,
+		"quota":       VarEntInfo.GetById(entId).Quota,
+		"mystaff":     Mysql.Count(Entniche_user, map[string]interface{}{"ent_id": entId}),
+		"list":        list,
+		"checkedList": checkedArr,
+	}})*/
+}

+ 34 - 0
service/ent_address_book_test.go

@@ -0,0 +1,34 @@
+package service
+
+import (
+	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/messagecenter"
+	"testing"
+)
+
+func TestChatGroupService_EntPersonsList(t *testing.T) {
+	type args struct {
+		param *messagecenter.EntPersonsListReq
+	}
+	tests := []struct {
+		name string
+		args args
+	}{
+		// TODO: Add test cases.
+		{
+			name: "企业列表",
+			args: args{
+				&messagecenter.EntPersonsListReq{
+					EntId:   14929,
+					Name:    "",
+					GroupId: 0,
+				},
+			},
+		},
+	}
+	for _, tt := range tests {
+		t.Run(tt.name, func(t *testing.T) {
+			b := ChatGroupService{}
+			b.EntPersonsList(tt.args.param)
+		})
+	}
+}