Browse Source

fix:根据客服id/职位id/群id 获取名称

duxin 2 years ago
parent
commit
cfc4628b27

+ 6 - 0
rpc/messagecenter/internal/server/messagecenterserver.go

@@ -105,3 +105,9 @@ func (s *MessageCenterServer) OneUserConversation(ctx context.Context, in *messa
 	l := logic.NewOneUserConversationLogic(ctx, s.svcCtx)
 	return l.OneUserConversation(in)
 }
+
+//  根据客服id/职位id/群id 获取名称
+func (s *MessageCenterServer) GetSenderName(ctx context.Context, in *messagecenter.GetSenderNameReq) (*messagecenter.GetSenderNameResp, error) {
+	l := logic.NewGetSenderNameLogic(ctx, s.svcCtx)
+	return l.GetSenderName(in)
+}

+ 19 - 2
rpc/messagecenter/messagecenter.proto

@@ -206,6 +206,20 @@ message OneUserConversationReq {
   string        appid = 3;
   int64 youPositionId =4;
 }
+
+//聊天保存
+message GetSenderNameReq {
+  int64 id = 1;
+  int64 entId = 2;
+  string        appid = 3;
+  int64 sType =4;
+}
+message GetSenderNameResp {
+  int64 error_code = 2; //响应代码
+  string error_msg = 1; //响应消息
+  string name = 3;
+}
+
 service messageCenter {
   // 查询数量
   rpc Count(CountReq) returns(CountResp);
@@ -233,6 +247,9 @@ service messageCenter {
   rpc GroupChat(MessageSaveReq)returns(CommonReq);
   // 1v1会话职位
   rpc OneUserPosition(OneUserPositionReq)returns(OneUserPositionResp);
-      // 1v1首次创建会话汇总表信息
-    rpc OneUserConversation(OneUserConversationReq) returns (CurrencyResp);
+  // 1v1首次创建会话汇总表信息
+  rpc OneUserConversation(OneUserConversationReq) returns (CurrencyResp);
+
+  // 根据客服id/职位id/群id 获取名称
+  rpc GetSenderName(GetSenderNameReq) returns (GetSenderNameResp);
 }

+ 8 - 0
rpc/messagecenter/messagecenter/messagecenter.go

@@ -40,6 +40,8 @@ type (
 		OneUserPosition(ctx context.Context, in *OneUserPositionReq, opts ...grpc.CallOption) (*OneUserPositionResp, error)
 		//  1v1首次创建会话汇总表信息
 		OneUserConversation(ctx context.Context, in *OneUserConversationReq, opts ...grpc.CallOption) (*CurrencyResp, error)
+		//  根据客服id/职位id/群id 获取名称
+		GetSenderName(ctx context.Context, in *GetSenderNameReq, opts ...grpc.CallOption) (*GetSenderNameResp, error)
 	}
 
 	defaultMessageCenter struct {
@@ -136,3 +138,9 @@ func (m *defaultMessageCenter) OneUserConversation(ctx context.Context, in *OneU
 	client := NewMessageCenterClient(m.cli.Conn())
 	return client.OneUserConversation(ctx, in, opts...)
 }
+
+// 根据客服id/职位id/群id 获取名称
+func (m *defaultMessageCenter) GetSenderName(ctx context.Context, in *GetSenderNameReq, opts ...grpc.CallOption) (*GetSenderNameResp, error) {
+	client := NewMessageCenterClient(m.cli.Conn())
+	return client.GetSenderName(ctx, in, opts...)
+}

+ 268 - 87
rpc/messagecenter/messagecenter/messagecenter.pb.go

@@ -2072,6 +2072,141 @@ func (x *OneUserConversationReq) GetYouPositionId() int64 {
 	return 0
 }
 
+// 聊天保存
+type GetSenderNameReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Id    int64  `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"`
+	EntId int64  `protobuf:"varint,2,opt,name=entId,proto3" json:"entId,omitempty"`
+	Appid string `protobuf:"bytes,3,opt,name=appid,proto3" json:"appid,omitempty"`
+	SType int64  `protobuf:"varint,4,opt,name=sType,proto3" json:"sType,omitempty"`
+}
+
+func (x *GetSenderNameReq) Reset() {
+	*x = GetSenderNameReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_messagecenter_proto_msgTypes[23]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *GetSenderNameReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetSenderNameReq) ProtoMessage() {}
+
+func (x *GetSenderNameReq) ProtoReflect() protoreflect.Message {
+	mi := &file_messagecenter_proto_msgTypes[23]
+	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 GetSenderNameReq.ProtoReflect.Descriptor instead.
+func (*GetSenderNameReq) Descriptor() ([]byte, []int) {
+	return file_messagecenter_proto_rawDescGZIP(), []int{23}
+}
+
+func (x *GetSenderNameReq) GetId() int64 {
+	if x != nil {
+		return x.Id
+	}
+	return 0
+}
+
+func (x *GetSenderNameReq) GetEntId() int64 {
+	if x != nil {
+		return x.EntId
+	}
+	return 0
+}
+
+func (x *GetSenderNameReq) GetAppid() string {
+	if x != nil {
+		return x.Appid
+	}
+	return ""
+}
+
+func (x *GetSenderNameReq) GetSType() int64 {
+	if x != nil {
+		return x.SType
+	}
+	return 0
+}
+
+type GetSenderNameResp struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	ErrorCode int64  `protobuf:"varint,2,opt,name=error_code,json=errorCode,proto3" json:"error_code,omitempty"` //响应代码
+	ErrorMsg  string `protobuf:"bytes,1,opt,name=error_msg,json=errorMsg,proto3" json:"error_msg,omitempty"`     //响应消息
+	Name      string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"`
+}
+
+func (x *GetSenderNameResp) Reset() {
+	*x = GetSenderNameResp{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_messagecenter_proto_msgTypes[24]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *GetSenderNameResp) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*GetSenderNameResp) ProtoMessage() {}
+
+func (x *GetSenderNameResp) ProtoReflect() protoreflect.Message {
+	mi := &file_messagecenter_proto_msgTypes[24]
+	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 GetSenderNameResp.ProtoReflect.Descriptor instead.
+func (*GetSenderNameResp) Descriptor() ([]byte, []int) {
+	return file_messagecenter_proto_rawDescGZIP(), []int{24}
+}
+
+func (x *GetSenderNameResp) GetErrorCode() int64 {
+	if x != nil {
+		return x.ErrorCode
+	}
+	return 0
+}
+
+func (x *GetSenderNameResp) GetErrorMsg() string {
+	if x != nil {
+		return x.ErrorMsg
+	}
+	return ""
+}
+
+func (x *GetSenderNameResp) GetName() string {
+	if x != nil {
+		return x.Name
+	}
+	return ""
+}
+
 var File_messagecenter_proto protoreflect.FileDescriptor
 
 var file_messagecenter_proto_rawDesc = []byte{
@@ -2357,77 +2492,95 @@ var file_messagecenter_proto_rawDesc = []byte{
 	0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64,
 	0x12, 0x24, 0x0a, 0x0d, 0x79, 0x6f, 0x75, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x49,
 	0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0d, 0x79, 0x6f, 0x75, 0x50, 0x6f, 0x73, 0x69,
-	0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x32, 0xc4, 0x08, 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,
+	0x74, 0x69, 0x6f, 0x6e, 0x49, 0x64, 0x22, 0x64, 0x0a, 0x10, 0x47, 0x65, 0x74, 0x53, 0x65, 0x6e,
+	0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x6e,
+	0x74, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, 0x6e, 0x74, 0x49, 0x64,
+	0x12, 0x14, 0x0a, 0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52,
+	0x05, 0x61, 0x70, 0x70, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x73, 0x54, 0x79, 0x70, 0x65, 0x18,
+	0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x73, 0x54, 0x79, 0x70, 0x65, 0x22, 0x63, 0x0a, 0x11,
+	0x47, 0x65, 0x74, 0x53, 0x65, 0x6e, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x73,
+	0x70, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18,
+	0x02, 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, 0x01, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x08, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x4d, 0x73, 0x67, 0x12, 0x12, 0x0a,
+	0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d,
+	0x65, 0x32, 0x98, 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, 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, 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, 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, 0x4e, 0x0a, 0x0f, 0x57, 0x69, 0x74,
-	0x68, 0x64, 0x72, 0x61, 0x77, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x2e, 0x6d,
-	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x61,
-	0x64, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77, 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, 0x4a, 0x0a, 0x0f, 0x41, 0x70, 0x70,
-	0x72, 0x61, 0x69, 0x73, 0x65, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x2e, 0x6d,
-	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x41, 0x70, 0x70,
-	0x72, 0x61, 0x69, 0x73, 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, 0x4b, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73,
-	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73,
-	0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72,
-	0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, 0x12,
-	0x1d, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e,
-	0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x53, 0x61, 0x76, 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, 0x58, 0x0a, 0x0f, 0x4f, 0x6e, 0x65, 0x55,
-	0x73, 0x65, 0x72, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x6d, 0x65,
-	0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x65, 0x55,
-	0x73, 0x65, 0x72, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x22,
-	0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x4f,
-	0x6e, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65,
-	0x73, 0x70, 0x12, 0x59, 0x0a, 0x13, 0x4f, 0x6e, 0x65, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e,
-	0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x6d, 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, 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, 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, 0x4e, 0x0a, 0x0f, 0x57, 0x69, 0x74, 0x68, 0x64, 0x72, 0x61, 0x77,
+	0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
+	0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x52, 0x65, 0x61, 0x64, 0x57, 0x69, 0x74, 0x68,
+	0x64, 0x72, 0x61, 0x77, 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, 0x4a, 0x0a, 0x0f, 0x41, 0x70, 0x70, 0x72, 0x61, 0x69, 0x73, 0x65,
+	0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1a, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67,
+	0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x41, 0x70, 0x70, 0x72, 0x61, 0x69, 0x73, 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, 0x4b, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e,
+	0x4c, 0x69, 0x73, 0x74, 0x12, 0x1e, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65,
+	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f,
+	0x6e, 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,
+	0x09, 0x47, 0x72, 0x6f, 0x75, 0x70, 0x43, 0x68, 0x61, 0x74, 0x12, 0x1d, 0x2e, 0x6d, 0x65, 0x73,
+	0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61,
+	0x67, 0x65, 0x53, 0x61, 0x76, 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, 0x58, 0x0a, 0x0f, 0x4f, 0x6e, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6f,
+	0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x21, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65,
+	0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x65, 0x55, 0x73, 0x65, 0x72, 0x50, 0x6f,
+	0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x1a, 0x22, 0x2e, 0x6d, 0x65, 0x73, 0x73,
 	0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x65, 0x55, 0x73, 0x65,
-	0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 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,
+	0x72, 0x50, 0x6f, 0x73, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x12, 0x59, 0x0a,
+	0x13, 0x4f, 0x6e, 0x65, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x76, 0x65, 0x72, 0x73, 0x61,
+	0x74, 0x69, 0x6f, 0x6e, 0x12, 0x25, 0x2e, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x63, 0x65,
+	0x6e, 0x74, 0x65, 0x72, 0x2e, 0x4f, 0x6e, 0x65, 0x55, 0x73, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x76,
+	0x65, 0x72, 0x73, 0x61, 0x74, 0x69, 0x6f, 0x6e, 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, 0x47, 0x65, 0x74, 0x53,
+	0x65, 0x6e, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x12, 0x1f, 0x2e, 0x6d, 0x65, 0x73, 0x73,
+	0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65, 0x6e,
+	0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x6d, 0x65, 0x73,
+	0x73, 0x61, 0x67, 0x65, 0x63, 0x65, 0x6e, 0x74, 0x65, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x53, 0x65,
+	0x6e, 0x64, 0x65, 0x72, 0x4e, 0x61, 0x6d, 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 (
@@ -2442,7 +2595,7 @@ func file_messagecenter_proto_rawDescGZIP() []byte {
 	return file_messagecenter_proto_rawDescData
 }
 
-var file_messagecenter_proto_msgTypes = make([]protoimpl.MessageInfo, 23)
+var file_messagecenter_proto_msgTypes = make([]protoimpl.MessageInfo, 25)
 var file_messagecenter_proto_goTypes = []interface{}{
 	(*CountReq)(nil),               // 0: messagecenter.CountReq
 	(*CountResp)(nil),              // 1: messagecenter.CountResp
@@ -2467,6 +2620,8 @@ var file_messagecenter_proto_goTypes = []interface{}{
 	(*OneUserPositionReq)(nil),     // 20: messagecenter.OneUserPositionReq
 	(*OneUserPositionResp)(nil),    // 21: messagecenter.OneUserPositionResp
 	(*OneUserConversationReq)(nil), // 22: messagecenter.OneUserConversationReq
+	(*GetSenderNameReq)(nil),       // 23: messagecenter.GetSenderNameReq
+	(*GetSenderNameResp)(nil),      // 24: messagecenter.GetSenderNameResp
 }
 var file_messagecenter_proto_depIdxs = []int32{
 	8,  // 0: messagecenter.CountResp.lastMessage:type_name -> messagecenter.MessageEntity
@@ -2487,22 +2642,24 @@ var file_messagecenter_proto_depIdxs = []int32{
 	18, // 15: messagecenter.messageCenter.GroupChat:input_type -> messagecenter.MessageSaveReq
 	20, // 16: messagecenter.messageCenter.OneUserPosition:input_type -> messagecenter.OneUserPositionReq
 	22, // 17: messagecenter.messageCenter.OneUserConversation:input_type -> messagecenter.OneUserConversationReq
-	1,  // 18: messagecenter.messageCenter.Count:output_type -> messagecenter.CountResp
-	3,  // 19: messagecenter.messageCenter.UserList:output_type -> messagecenter.UserResp
-	6,  // 20: messagecenter.messageCenter.FindMessage:output_type -> messagecenter.MessageResp
-	7,  // 21: messagecenter.messageCenter.SaveMessage:output_type -> messagecenter.SaveMessageResp
-	11, // 22: messagecenter.messageCenter.CreateChatSession:output_type -> messagecenter.ChatSessionResp
-	11, // 23: messagecenter.messageCenter.CloseChatSession:output_type -> messagecenter.ChatSessionResp
-	6,  // 24: messagecenter.messageCenter.SaveAutoReplyMsg:output_type -> messagecenter.MessageResp
-	16, // 25: messagecenter.messageCenter.UpdateReadById:output_type -> messagecenter.CurrencyResp
-	16, // 26: messagecenter.messageCenter.WithdrawMessage:output_type -> messagecenter.CurrencyResp
-	16, // 27: messagecenter.messageCenter.AppraiseMessage:output_type -> messagecenter.CurrencyResp
-	3,  // 28: messagecenter.messageCenter.ConversationList:output_type -> messagecenter.UserResp
-	19, // 29: messagecenter.messageCenter.GroupChat:output_type -> messagecenter.CommonReq
-	21, // 30: messagecenter.messageCenter.OneUserPosition:output_type -> messagecenter.OneUserPositionResp
-	16, // 31: messagecenter.messageCenter.OneUserConversation:output_type -> messagecenter.CurrencyResp
-	18, // [18:32] is the sub-list for method output_type
-	4,  // [4:18] is the sub-list for method input_type
+	23, // 18: messagecenter.messageCenter.GetSenderName:input_type -> messagecenter.GetSenderNameReq
+	1,  // 19: messagecenter.messageCenter.Count:output_type -> messagecenter.CountResp
+	3,  // 20: messagecenter.messageCenter.UserList:output_type -> messagecenter.UserResp
+	6,  // 21: messagecenter.messageCenter.FindMessage:output_type -> messagecenter.MessageResp
+	7,  // 22: messagecenter.messageCenter.SaveMessage:output_type -> messagecenter.SaveMessageResp
+	11, // 23: messagecenter.messageCenter.CreateChatSession:output_type -> messagecenter.ChatSessionResp
+	11, // 24: messagecenter.messageCenter.CloseChatSession:output_type -> messagecenter.ChatSessionResp
+	6,  // 25: messagecenter.messageCenter.SaveAutoReplyMsg:output_type -> messagecenter.MessageResp
+	16, // 26: messagecenter.messageCenter.UpdateReadById:output_type -> messagecenter.CurrencyResp
+	16, // 27: messagecenter.messageCenter.WithdrawMessage:output_type -> messagecenter.CurrencyResp
+	16, // 28: messagecenter.messageCenter.AppraiseMessage:output_type -> messagecenter.CurrencyResp
+	3,  // 29: messagecenter.messageCenter.ConversationList:output_type -> messagecenter.UserResp
+	19, // 30: messagecenter.messageCenter.GroupChat:output_type -> messagecenter.CommonReq
+	21, // 31: messagecenter.messageCenter.OneUserPosition:output_type -> messagecenter.OneUserPositionResp
+	16, // 32: messagecenter.messageCenter.OneUserConversation:output_type -> messagecenter.CurrencyResp
+	24, // 33: messagecenter.messageCenter.GetSenderName:output_type -> messagecenter.GetSenderNameResp
+	19, // [19:34] is the sub-list for method output_type
+	4,  // [4:19] is the sub-list for method input_type
 	4,  // [4:4] is the sub-list for extension type_name
 	4,  // [4:4] is the sub-list for extension extendee
 	0,  // [0:4] is the sub-list for field type_name
@@ -2790,6 +2947,30 @@ func file_messagecenter_proto_init() {
 				return nil
 			}
 		}
+		file_messagecenter_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*GetSenderNameReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_messagecenter_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*GetSenderNameResp); 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{
@@ -2797,7 +2978,7 @@ func file_messagecenter_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_messagecenter_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   23,
+			NumMessages:   25,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

+ 38 - 0
rpc/messagecenter/messagecenter/messagecenter_grpc.pb.go

@@ -50,6 +50,8 @@ type MessageCenterClient interface {
 	OneUserPosition(ctx context.Context, in *OneUserPositionReq, opts ...grpc.CallOption) (*OneUserPositionResp, error)
 	// 1v1首次创建会话汇总表信息
 	OneUserConversation(ctx context.Context, in *OneUserConversationReq, opts ...grpc.CallOption) (*CurrencyResp, error)
+	// 根据客服id/职位id/群id 获取名称
+	GetSenderName(ctx context.Context, in *GetSenderNameReq, opts ...grpc.CallOption) (*GetSenderNameResp, error)
 }
 
 type messageCenterClient struct {
@@ -186,6 +188,15 @@ func (c *messageCenterClient) OneUserConversation(ctx context.Context, in *OneUs
 	return out, nil
 }
 
+func (c *messageCenterClient) GetSenderName(ctx context.Context, in *GetSenderNameReq, opts ...grpc.CallOption) (*GetSenderNameResp, error) {
+	out := new(GetSenderNameResp)
+	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/GetSenderName", 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
@@ -218,6 +229,8 @@ type MessageCenterServer interface {
 	OneUserPosition(context.Context, *OneUserPositionReq) (*OneUserPositionResp, error)
 	// 1v1首次创建会话汇总表信息
 	OneUserConversation(context.Context, *OneUserConversationReq) (*CurrencyResp, error)
+	// 根据客服id/职位id/群id 获取名称
+	GetSenderName(context.Context, *GetSenderNameReq) (*GetSenderNameResp, error)
 	mustEmbedUnimplementedMessageCenterServer()
 }
 
@@ -267,6 +280,9 @@ func (UnimplementedMessageCenterServer) OneUserPosition(context.Context, *OneUse
 func (UnimplementedMessageCenterServer) OneUserConversation(context.Context, *OneUserConversationReq) (*CurrencyResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method OneUserConversation not implemented")
 }
+func (UnimplementedMessageCenterServer) GetSenderName(context.Context, *GetSenderNameReq) (*GetSenderNameResp, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method GetSenderName not implemented")
+}
 func (UnimplementedMessageCenterServer) mustEmbedUnimplementedMessageCenterServer() {}
 
 // UnsafeMessageCenterServer may be embedded to opt out of forward compatibility for this service.
@@ -532,6 +548,24 @@ func _MessageCenter_OneUserConversation_Handler(srv interface{}, ctx context.Con
 	return interceptor(ctx, in, info, handler)
 }
 
+func _MessageCenter_GetSenderName_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(GetSenderNameReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(MessageCenterServer).GetSenderName(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/messagecenter.messageCenter/GetSenderName",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(MessageCenterServer).GetSenderName(ctx, req.(*GetSenderNameReq))
+	}
+	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)
@@ -595,6 +629,10 @@ var MessageCenter_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "OneUserConversation",
 			Handler:    _MessageCenter_OneUserConversation_Handler,
 		},
+		{
+			MethodName: "GetSenderName",
+			Handler:    _MessageCenter_GetSenderName_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "messagecenter.proto",

+ 18 - 0
service/message_mail_box.go

@@ -1340,3 +1340,21 @@ func OneCreatingSession(in *messagecenter.OneUserConversationReq) string {
 	}
 	return "创建汇总表数据失败"
 }
+
+func GetSenderName(in *messagecenter.GetSenderNameReq) string {
+	var name string
+	switch in.SType {
+	case 1: //客服
+		data := IC.BaseMysql.FindOne("socialize_tenant_seats", map[string]interface{}{"ent_id": in.EntId, "customer_service_id": in.Id}, "", "")
+		name = quitl.InterfaceToStr((*data)["name"])
+	case 2: //用户
+		phoneMap, _, positionMap := EntPerson(in.EntId, true)
+		name = phoneMap[positionMap[quitl.IntAll(in.Id)]]
+	case 3: //群
+		data := IC.BaseMysql.FindOne(util.SOCIALIZE_CHAT_GROUP, map[string]interface{}{"ent_id": in.EntId, "id": in.Id}, "", "")
+		if data != nil {
+			name = quitl.InterfaceToStr((*data)["name"])
+		}
+	}
+	return name
+}