wfz před 3 roky
rodič
revize
fd88750635

+ 161 - 50
api/chat/chat.pb.go

@@ -809,6 +809,85 @@ func (x *RoomReply) GetRoomId() int64 {
 	return 0
 }
 
+type FindChatRecordListRequest struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	NextId     int64  `protobuf:"varint,1,opt,name=nextId,proto3" json:"nextId"`
+	Offset     int64  `protobuf:"varint,2,opt,name=offset,proto3" json:"offset"`
+	RoomId     int64  `protobuf:"varint,3,opt,name=roomId,proto3" json:"roomId"`
+	PersonType string `protobuf:"bytes,4,opt,name=personType,proto3" json:"personType"` // 类型
+	PersonID   string `protobuf:"bytes,5,opt,name=personID,proto3" json:"personID"`     // 查询目标的ID
+}
+
+func (x *FindChatRecordListRequest) Reset() {
+	*x = FindChatRecordListRequest{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_chat_proto_msgTypes[11]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *FindChatRecordListRequest) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*FindChatRecordListRequest) ProtoMessage() {}
+
+func (x *FindChatRecordListRequest) ProtoReflect() protoreflect.Message {
+	mi := &file_chat_proto_msgTypes[11]
+	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 FindChatRecordListRequest.ProtoReflect.Descriptor instead.
+func (*FindChatRecordListRequest) Descriptor() ([]byte, []int) {
+	return file_chat_proto_rawDescGZIP(), []int{11}
+}
+
+func (x *FindChatRecordListRequest) GetNextId() int64 {
+	if x != nil {
+		return x.NextId
+	}
+	return 0
+}
+
+func (x *FindChatRecordListRequest) GetOffset() int64 {
+	if x != nil {
+		return x.Offset
+	}
+	return 0
+}
+
+func (x *FindChatRecordListRequest) GetRoomId() int64 {
+	if x != nil {
+		return x.RoomId
+	}
+	return 0
+}
+
+func (x *FindChatRecordListRequest) GetPersonType() string {
+	if x != nil {
+		return x.PersonType
+	}
+	return ""
+}
+
+func (x *FindChatRecordListRequest) GetPersonID() string {
+	if x != nil {
+		return x.PersonID
+	}
+	return ""
+}
+
 var File_chat_proto protoreflect.FileDescriptor
 
 var file_chat_proto_rawDesc = []byte{
@@ -917,41 +996,57 @@ var file_chat_proto_rawDesc = []byte{
 	0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52,
 	0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x22, 0x23, 0x0a, 0x09, 0x52, 0x6f, 0x6f, 0x6d, 0x52,
 	0x65, 0x70, 0x6c, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x18, 0x01,
-	0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x32, 0x9d, 0x04, 0x0a,
-	0x04, 0x43, 0x68, 0x61, 0x74, 0x12, 0x72, 0x0a, 0x1e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73,
-	0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74,
-	0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f,
-	0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x6e, 0x64, 0x50, 0x61, 0x72, 0x74,
-	0x6e, 0x65, 0x72, 0x49, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x1a, 0x2d, 0x2e, 0x61, 0x70, 0x69,
-	0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65, 0x72, 0x50,
-	0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69, 0x6f, 0x6e,
-	0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x44, 0x0a, 0x0e, 0x43, 0x72, 0x65,
-	0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x1d, 0x2e, 0x61, 0x70,
-	0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61,
-	0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x1a, 0x13, 0x2e, 0x61, 0x70, 0x69,
-	0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12,
-	0x5f, 0x0a, 0x14, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x50, 0x65, 0x72,
-	0x73, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f,
-	0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x67, 0x65, 0x41, 0x6e, 0x64,
-	0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x21, 0x2e,
-	0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4f, 0x6e, 0x6c, 0x69, 0x6e,
-	0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79,
-	0x12, 0x61, 0x0a, 0x13, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x64, 0x52,
-	0x6f, 0x6f, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68,
-	0x61, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x6f,
-	0x6f, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x22, 0x2e,
-	0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72,
-	0x46, 0x69, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c,
-	0x79, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x64, 0x52,
-	0x6f, 0x6f, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68,
-	0x61, 0x74, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x4c,
-	0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69,
-	0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x6f,
-	0x6f, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x3d, 0x0a,
-	0x07, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63,
-	0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65,
-	0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65,
-	0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x3d, 0x0a, 0x08,
+	0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d, 0x49, 0x64, 0x22, 0x9f, 0x01, 0x0a,
+	0x19, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c,
+	0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x65,
+	0x78, 0x74, 0x49, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x65, 0x78, 0x74,
+	0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x18, 0x02, 0x20, 0x01,
+	0x28, 0x03, 0x52, 0x06, 0x6f, 0x66, 0x66, 0x73, 0x65, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f,
+	0x6f, 0x6d, 0x49, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d,
+	0x49, 0x64, 0x12, 0x1e, 0x0a, 0x0a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65,
+	0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x54, 0x79,
+	0x70, 0x65, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x44, 0x18, 0x05,
+	0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x44, 0x32, 0xfb,
+	0x04, 0x0a, 0x04, 0x43, 0x68, 0x61, 0x74, 0x12, 0x72, 0x0a, 0x1e, 0x43, 0x68, 0x65, 0x63, 0x6b,
+	0x55, 0x73, 0x65, 0x72, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x73, 0x52, 0x65, 0x6c,
+	0x61, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e,
+	0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x41, 0x6e, 0x64, 0x50, 0x61,
+	0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x1a, 0x2d, 0x2e, 0x61,
+	0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x55, 0x73, 0x65,
+	0x72, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x49, 0x73, 0x52, 0x65, 0x6c, 0x61, 0x74, 0x69,
+	0x6f, 0x6e, 0x73, 0x68, 0x69, 0x70, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x44, 0x0a, 0x0e, 0x43,
+	0x72, 0x65, 0x61, 0x74, 0x65, 0x43, 0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x12, 0x1d, 0x2e,
+	0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x43,
+	0x68, 0x61, 0x74, 0x52, 0x6f, 0x6f, 0x6d, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x1a, 0x13, 0x2e, 0x61,
+	0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x52, 0x65, 0x70, 0x6c,
+	0x79, 0x12, 0x5f, 0x0a, 0x14, 0x46, 0x69, 0x6e, 0x64, 0x4f, 0x6e, 0x6c, 0x69, 0x6e, 0x65, 0x50,
+	0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e,
+	0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x67, 0x65, 0x41,
+	0x6e, 0x64, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+	0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4f, 0x6e, 0x6c,
+	0x69, 0x6e, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70,
+	0x6c, 0x79, 0x12, 0x61, 0x0a, 0x13, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6e,
+	0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e,
+	0x63, 0x68, 0x61, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x64,
+	0x52, 0x6f, 0x6f, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
+	0x22, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x50, 0x61, 0x72, 0x74, 0x6e,
+	0x65, 0x72, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
+	0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x58, 0x0a, 0x10, 0x55, 0x73, 0x65, 0x72, 0x46, 0x69, 0x6e,
+	0x64, 0x52, 0x6f, 0x6f, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x69, 0x2e,
+	0x63, 0x68, 0x61, 0x74, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x6f, 0x6f,
+	0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61,
+	0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x55, 0x73, 0x65, 0x72, 0x46, 0x69, 0x6e, 0x64,
+	0x52, 0x6f, 0x6f, 0x6d, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12,
+	0x3d, 0x0a, 0x07, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69,
+	0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e, 0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x71,
+	0x75, 0x65, 0x73, 0x74, 0x1a, 0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e,
+	0x52, 0x65, 0x63, 0x65, 0x69, 0x76, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x12, 0x5c,
+	0x0a, 0x12, 0x46, 0x69, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64,
+	0x4c, 0x69, 0x73, 0x74, 0x12, 0x23, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x2e,
+	0x46, 0x69, 0x6e, 0x64, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c, 0x69,
+	0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1f, 0x2e, 0x61, 0x70, 0x69, 0x2e,
+	0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72,
+	0x64, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x00, 0x42, 0x3d, 0x0a, 0x08,
 	0x61, 0x70, 0x69, 0x2e, 0x63, 0x68, 0x61, 0x74, 0x50, 0x01, 0x5a, 0x2f, 0x67, 0x69, 0x74, 0x2e,
 	0x69, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65,
 	0x72, 0x2f, 0x70, 0x77, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x70,
@@ -971,7 +1066,7 @@ func file_chat_proto_rawDescGZIP() []byte {
 	return file_chat_proto_rawDescData
 }
 
-var file_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 11)
+var file_chat_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
 var file_chat_proto_goTypes = []interface{}{
 	(*PartnerFindRoomListRequest)(nil),          // 0: api.chat.PartnerFindRoomListRequest
 	(*UserFindRoomListRequest)(nil),             // 1: api.chat.UserFindRoomListRequest
@@ -984,27 +1079,31 @@ var file_chat_proto_goTypes = []interface{}{
 	(*ReceiveReply)(nil),                        // 8: api.chat.ReceiveReply
 	(*CheckUserPartnerIsRelationshipReply)(nil), // 9: api.chat.CheckUserPartnerIsRelationshipReply
 	(*RoomReply)(nil),                           // 10: api.chat.RoomReply
-	(*common.UserAndPartnerIdParam)(nil),        // 11: api.common.UserAndPartnerIdParam
-	(*common.ListPageAndPersonRequest)(nil),     // 12: api.common.ListPageAndPersonRequest
-	(*common.OnlinePersonListReply)(nil),        // 13: api.common.OnlinePersonListReply
+	(*FindChatRecordListRequest)(nil),           // 11: api.chat.FindChatRecordListRequest
+	(*common.UserAndPartnerIdParam)(nil),        // 12: api.common.UserAndPartnerIdParam
+	(*common.ListPageAndPersonRequest)(nil),     // 13: api.common.ListPageAndPersonRequest
+	(*common.OnlinePersonListReply)(nil),        // 14: api.common.OnlinePersonListReply
+	(*common.ChatRecordListReply)(nil),          // 15: api.common.ChatRecordListReply
 }
 var file_chat_proto_depIdxs = []int32{
 	3,  // 0: api.chat.UserFindRoomListReply.list:type_name -> api.chat.UserRoomInfo
 	5,  // 1: api.chat.PartnerFindRoomListReply.list:type_name -> api.chat.PartnerRoomInfo
-	11, // 2: api.chat.Chat.CheckUserPartnerIsRelationship:input_type -> api.common.UserAndPartnerIdParam
+	12, // 2: api.chat.Chat.CheckUserPartnerIsRelationship:input_type -> api.common.UserAndPartnerIdParam
 	6,  // 3: api.chat.Chat.CreateChatRoom:input_type -> api.chat.CreateChatRoomParam
-	12, // 4: api.chat.Chat.FindOnlinePersonList:input_type -> api.common.ListPageAndPersonRequest
+	13, // 4: api.chat.Chat.FindOnlinePersonList:input_type -> api.common.ListPageAndPersonRequest
 	0,  // 5: api.chat.Chat.PartnerFindRoomList:input_type -> api.chat.PartnerFindRoomListRequest
 	1,  // 6: api.chat.Chat.UserFindRoomList:input_type -> api.chat.UserFindRoomListRequest
 	7,  // 7: api.chat.Chat.Receive:input_type -> api.chat.ReceiveRequest
-	9,  // 8: api.chat.Chat.CheckUserPartnerIsRelationship:output_type -> api.chat.CheckUserPartnerIsRelationshipReply
-	10, // 9: api.chat.Chat.CreateChatRoom:output_type -> api.chat.RoomReply
-	13, // 10: api.chat.Chat.FindOnlinePersonList:output_type -> api.common.OnlinePersonListReply
-	4,  // 11: api.chat.Chat.PartnerFindRoomList:output_type -> api.chat.PartnerFindRoomListReply
-	2,  // 12: api.chat.Chat.UserFindRoomList:output_type -> api.chat.UserFindRoomListReply
-	8,  // 13: api.chat.Chat.Receive:output_type -> api.chat.ReceiveReply
-	8,  // [8:14] is the sub-list for method output_type
-	2,  // [2:8] is the sub-list for method input_type
+	11, // 8: api.chat.Chat.FindChatRecordList:input_type -> api.chat.FindChatRecordListRequest
+	9,  // 9: api.chat.Chat.CheckUserPartnerIsRelationship:output_type -> api.chat.CheckUserPartnerIsRelationshipReply
+	10, // 10: api.chat.Chat.CreateChatRoom:output_type -> api.chat.RoomReply
+	14, // 11: api.chat.Chat.FindOnlinePersonList:output_type -> api.common.OnlinePersonListReply
+	4,  // 12: api.chat.Chat.PartnerFindRoomList:output_type -> api.chat.PartnerFindRoomListReply
+	2,  // 13: api.chat.Chat.UserFindRoomList:output_type -> api.chat.UserFindRoomListReply
+	8,  // 14: api.chat.Chat.Receive:output_type -> api.chat.ReceiveReply
+	15, // 15: api.chat.Chat.FindChatRecordList:output_type -> api.common.ChatRecordListReply
+	9,  // [9:16] is the sub-list for method output_type
+	2,  // [2:9] is the sub-list for method input_type
 	2,  // [2:2] is the sub-list for extension type_name
 	2,  // [2:2] is the sub-list for extension extendee
 	0,  // [0:2] is the sub-list for field type_name
@@ -1148,6 +1247,18 @@ func file_chat_proto_init() {
 				return nil
 			}
 		}
+		file_chat_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*FindChatRecordListRequest); 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{
@@ -1155,7 +1266,7 @@ func file_chat_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_chat_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   11,
+			NumMessages:   12,
 			NumExtensions: 0,
 			NumServices:   1,
 		},

+ 10 - 1
api/chat/chat.proto

@@ -23,7 +23,8 @@ service Chat {
   // 用户查询房间列表
   rpc UserFindRoomList (UserFindRoomListRequest) returns (UserFindRoomListReply){};
   rpc Receive (ReceiveRequest) returns (ReceiveReply){};
-
+  // 用户查询聊天记录
+  rpc FindChatRecordList (FindChatRecordListRequest) returns (common.ChatRecordListReply){};
 }
 
 message PartnerFindRoomListRequest {
@@ -104,4 +105,12 @@ message CheckUserPartnerIsRelationshipReply{
 
 message RoomReply{
   int64 roomId = 1;
+}
+
+message FindChatRecordListRequest{
+  int64 nextId = 1;
+  int64 offset = 2;
+  int64 roomId = 3;
+  string personType = 4; // 类型
+  string personID = 5; // 查询目标的ID
 }

+ 38 - 0
api/chat/chat_grpc.pb.go

@@ -30,6 +30,8 @@ type ChatClient interface {
 	// 用户查询房间列表
 	UserFindRoomList(ctx context.Context, in *UserFindRoomListRequest, opts ...grpc.CallOption) (*UserFindRoomListReply, error)
 	Receive(ctx context.Context, in *ReceiveRequest, opts ...grpc.CallOption) (*ReceiveReply, error)
+	// 用户查询聊天记录
+	FindChatRecordList(ctx context.Context, in *FindChatRecordListRequest, opts ...grpc.CallOption) (*common.ChatRecordListReply, error)
 }
 
 type chatClient struct {
@@ -94,6 +96,15 @@ func (c *chatClient) Receive(ctx context.Context, in *ReceiveRequest, opts ...gr
 	return out, nil
 }
 
+func (c *chatClient) FindChatRecordList(ctx context.Context, in *FindChatRecordListRequest, opts ...grpc.CallOption) (*common.ChatRecordListReply, error) {
+	out := new(common.ChatRecordListReply)
+	err := c.cc.Invoke(ctx, "/api.chat.Chat/FindChatRecordList", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // ChatServer is the server API for Chat service.
 // All implementations must embed UnimplementedChatServer
 // for forward compatibility
@@ -109,6 +120,8 @@ type ChatServer interface {
 	// 用户查询房间列表
 	UserFindRoomList(context.Context, *UserFindRoomListRequest) (*UserFindRoomListReply, error)
 	Receive(context.Context, *ReceiveRequest) (*ReceiveReply, error)
+	// 用户查询聊天记录
+	FindChatRecordList(context.Context, *FindChatRecordListRequest) (*common.ChatRecordListReply, error)
 	mustEmbedUnimplementedChatServer()
 }
 
@@ -134,6 +147,9 @@ func (UnimplementedChatServer) UserFindRoomList(context.Context, *UserFindRoomLi
 func (UnimplementedChatServer) Receive(context.Context, *ReceiveRequest) (*ReceiveReply, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method Receive not implemented")
 }
+func (UnimplementedChatServer) FindChatRecordList(context.Context, *FindChatRecordListRequest) (*common.ChatRecordListReply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method FindChatRecordList not implemented")
+}
 func (UnimplementedChatServer) mustEmbedUnimplementedChatServer() {}
 
 // UnsafeChatServer may be embedded to opt out of forward compatibility for this service.
@@ -255,6 +271,24 @@ func _Chat_Receive_Handler(srv interface{}, ctx context.Context, dec func(interf
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Chat_FindChatRecordList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(FindChatRecordListRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(ChatServer).FindChatRecordList(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.chat.Chat/FindChatRecordList",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(ChatServer).FindChatRecordList(ctx, req.(*FindChatRecordListRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // Chat_ServiceDesc is the grpc.ServiceDesc for Chat service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -286,6 +320,10 @@ var Chat_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "Receive",
 			Handler:    _Chat_Receive_Handler,
 		},
+		{
+			MethodName: "FindChatRecordList",
+			Handler:    _Chat_FindChatRecordList_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "chat.proto",

+ 292 - 12
api/common/common.pb.go

@@ -2152,6 +2152,219 @@ func (x *OnlinePersonInfo) GetArea() string {
 	return ""
 }
 
+type ChatRecordListReply struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	List   []*ChatRecordInfo `protobuf:"bytes,1,rep,name=list,proto3" json:"list"`
+	NextId int64             `protobuf:"varint,2,opt,name=nextId,proto3" json:"nextId"`
+}
+
+func (x *ChatRecordListReply) Reset() {
+	*x = ChatRecordListReply{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_common_proto_msgTypes[30]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ChatRecordListReply) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ChatRecordListReply) ProtoMessage() {}
+
+func (x *ChatRecordListReply) ProtoReflect() protoreflect.Message {
+	mi := &file_common_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 ChatRecordListReply.ProtoReflect.Descriptor instead.
+func (*ChatRecordListReply) Descriptor() ([]byte, []int) {
+	return file_common_proto_rawDescGZIP(), []int{30}
+}
+
+func (x *ChatRecordListReply) GetList() []*ChatRecordInfo {
+	if x != nil {
+		return x.List
+	}
+	return nil
+}
+
+func (x *ChatRecordListReply) GetNextId() int64 {
+	if x != nil {
+		return x.NextId
+	}
+	return 0
+}
+
+type ChatRecordInfo struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	MessageId int64    `protobuf:"varint,1,opt,name=messageId,proto3" json:"messageId"` // 消息的ID
+	MsgType   string   `protobuf:"bytes,2,opt,name=msgType,proto3" json:"msgType"`      // 消息类型
+	Message   *Message `protobuf:"bytes,3,opt,name=message,proto3" json:"message"`      // 消息的结构
+	RoomId    int64    `protobuf:"varint,4,opt,name=roomId,proto3" json:"roomId"`       // 房间ID
+	IsSelf    bool     `protobuf:"varint,5,opt,name=isSelf,proto3" json:"isSelf"`       // 是否是自己
+	SendTime  int64    `protobuf:"varint,6,opt,name=sendTime,proto3" json:"sendTime"`   // 发送时间
+	Status    string   `protobuf:"bytes,7,opt,name=status,proto3" json:"status"`        // 消息状态
+}
+
+func (x *ChatRecordInfo) Reset() {
+	*x = ChatRecordInfo{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_common_proto_msgTypes[31]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *ChatRecordInfo) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*ChatRecordInfo) ProtoMessage() {}
+
+func (x *ChatRecordInfo) ProtoReflect() protoreflect.Message {
+	mi := &file_common_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 ChatRecordInfo.ProtoReflect.Descriptor instead.
+func (*ChatRecordInfo) Descriptor() ([]byte, []int) {
+	return file_common_proto_rawDescGZIP(), []int{31}
+}
+
+func (x *ChatRecordInfo) GetMessageId() int64 {
+	if x != nil {
+		return x.MessageId
+	}
+	return 0
+}
+
+func (x *ChatRecordInfo) GetMsgType() string {
+	if x != nil {
+		return x.MsgType
+	}
+	return ""
+}
+
+func (x *ChatRecordInfo) GetMessage() *Message {
+	if x != nil {
+		return x.Message
+	}
+	return nil
+}
+
+func (x *ChatRecordInfo) GetRoomId() int64 {
+	if x != nil {
+		return x.RoomId
+	}
+	return 0
+}
+
+func (x *ChatRecordInfo) GetIsSelf() bool {
+	if x != nil {
+		return x.IsSelf
+	}
+	return false
+}
+
+func (x *ChatRecordInfo) GetSendTime() int64 {
+	if x != nil {
+		return x.SendTime
+	}
+	return 0
+}
+
+func (x *ChatRecordInfo) GetStatus() string {
+	if x != nil {
+		return x.Status
+	}
+	return ""
+}
+
+type Message struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Content     string `protobuf:"bytes,1,opt,name=content,proto3" json:"content"`         // 文本内容
+	MaterialUrl string `protobuf:"bytes,2,opt,name=materialUrl,proto3" json:"materialUrl"` // 素材链接
+	Second      int64  `protobuf:"varint,3,opt,name=second,proto3" json:"second"`          // 音频的秒数
+}
+
+func (x *Message) Reset() {
+	*x = Message{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_common_proto_msgTypes[32]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *Message) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*Message) ProtoMessage() {}
+
+func (x *Message) ProtoReflect() protoreflect.Message {
+	mi := &file_common_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 Message.ProtoReflect.Descriptor instead.
+func (*Message) Descriptor() ([]byte, []int) {
+	return file_common_proto_rawDescGZIP(), []int{32}
+}
+
+func (x *Message) GetContent() string {
+	if x != nil {
+		return x.Content
+	}
+	return ""
+}
+
+func (x *Message) GetMaterialUrl() string {
+	if x != nil {
+		return x.MaterialUrl
+	}
+	return ""
+}
+
+func (x *Message) GetSecond() int64 {
+	if x != nil {
+		return x.Second
+	}
+	return 0
+}
+
 var File_common_proto protoreflect.FileDescriptor
 
 var file_common_proto_rawDesc = []byte{
@@ -2393,11 +2606,37 @@ var file_common_proto_rawDesc = []byte{
 	0x08, 0x70, 0x72, 0x6f, 0x76, 0x69, 0x6e, 0x63, 0x65, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x69, 0x74,
 	0x79, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a,
 	0x04, 0x61, 0x72, 0x65, 0x61, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x65,
-	0x61, 0x42, 0x43, 0x0a, 0x0a, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50,
-	0x01, 0x5a, 0x33, 0x67, 0x69, 0x74, 0x2e, 0x69, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x2e, 0x63, 0x6f,
-	0x6d, 0x2f, 0x73, 0x65, 0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x77, 0x2d, 0x70, 0x72, 0x6f, 0x74,
-	0x6f, 0x62, 0x75, 0x66, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x3b,
-	0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x61, 0x22, 0x5d, 0x0a, 0x13, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x4c,
+	0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x2e, 0x0a, 0x04, 0x6c, 0x69, 0x73, 0x74,
+	0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d,
+	0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49, 0x6e,
+	0x66, 0x6f, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x12, 0x16, 0x0a, 0x06, 0x6e, 0x65, 0x78, 0x74,
+	0x49, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x6e, 0x65, 0x78, 0x74, 0x49, 0x64,
+	0x22, 0xdb, 0x01, 0x0a, 0x0e, 0x43, 0x68, 0x61, 0x74, 0x52, 0x65, 0x63, 0x6f, 0x72, 0x64, 0x49,
+	0x6e, 0x66, 0x6f, 0x12, 0x1c, 0x0a, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49, 0x64,
+	0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x49,
+	0x64, 0x12, 0x18, 0x0a, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01,
+	0x28, 0x09, 0x52, 0x07, 0x6d, 0x73, 0x67, 0x54, 0x79, 0x70, 0x65, 0x12, 0x2d, 0x0a, 0x07, 0x6d,
+	0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x13, 0x2e, 0x61,
+	0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67,
+	0x65, 0x52, 0x07, 0x6d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x6f,
+	0x6f, 0x6d, 0x49, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x72, 0x6f, 0x6f, 0x6d,
+	0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x69, 0x73, 0x53, 0x65, 0x6c, 0x66, 0x18, 0x05, 0x20, 0x01,
+	0x28, 0x08, 0x52, 0x06, 0x69, 0x73, 0x53, 0x65, 0x6c, 0x66, 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x65,
+	0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x73, 0x65,
+	0x6e, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73,
+	0x18, 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x5d,
+	0x0a, 0x07, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 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, 0x20, 0x0a, 0x0b, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69, 0x61, 0x6c, 0x55,
+	0x72, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x6d, 0x61, 0x74, 0x65, 0x72, 0x69,
+	0x61, 0x6c, 0x55, 0x72, 0x6c, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x18,
+	0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x73, 0x65, 0x63, 0x6f, 0x6e, 0x64, 0x42, 0x43, 0x0a,
+	0x0a, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x50, 0x01, 0x5a, 0x33, 0x67,
+	0x69, 0x74, 0x2e, 0x69, 0x6b, 0x75, 0x62, 0x61, 0x6e, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x73, 0x65,
+	0x72, 0x76, 0x65, 0x72, 0x2f, 0x70, 0x77, 0x2d, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66,
+	0x2f, 0x61, 0x70, 0x69, 0x2f, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x3b, 0x63, 0x6f, 0x6d, 0x6d,
+	0x6f, 0x6e, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -2412,7 +2651,7 @@ func file_common_proto_rawDescGZIP() []byte {
 	return file_common_proto_rawDescData
 }
 
-var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 30)
+var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 33)
 var file_common_proto_goTypes = []interface{}{
 	(*UserAndPartnerIdParam)(nil),    // 0: api.common.UserAndPartnerIdParam
 	(*UserAndPartnerParam)(nil),      // 1: api.common.UserAndPartnerParam
@@ -2444,17 +2683,22 @@ var file_common_proto_goTypes = []interface{}{
 	(*UpdateInformationRequest)(nil), // 27: api.common.UpdateInformationRequest
 	(*OnlinePersonListReply)(nil),    // 28: api.common.OnlinePersonListReply
 	(*OnlinePersonInfo)(nil),         // 29: api.common.OnlinePersonInfo
+	(*ChatRecordListReply)(nil),      // 30: api.common.ChatRecordListReply
+	(*ChatRecordInfo)(nil),           // 31: api.common.ChatRecordInfo
+	(*Message)(nil),                  // 32: api.common.Message
 }
 var file_common_proto_depIdxs = []int32{
 	24, // 0: api.common.HomeInfo.tagList:type_name -> api.common.TagList
 	15, // 1: api.common.PersonDBReply.list:type_name -> api.common.PersonDB
 	24, // 2: api.common.TagListReply.list:type_name -> api.common.TagList
 	29, // 3: api.common.OnlinePersonListReply.list:type_name -> api.common.OnlinePersonInfo
-	4,  // [4:4] is the sub-list for method output_type
-	4,  // [4:4] 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
+	31, // 4: api.common.ChatRecordListReply.list:type_name -> api.common.ChatRecordInfo
+	32, // 5: api.common.ChatRecordInfo.message:type_name -> api.common.Message
+	6,  // [6:6] is the sub-list for method output_type
+	6,  // [6:6] is the sub-list for method input_type
+	6,  // [6:6] is the sub-list for extension type_name
+	6,  // [6:6] is the sub-list for extension extendee
+	0,  // [0:6] is the sub-list for field type_name
 }
 
 func init() { file_common_proto_init() }
@@ -2823,6 +3067,42 @@ func file_common_proto_init() {
 				return nil
 			}
 		}
+		file_common_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ChatRecordListReply); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_common_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*ChatRecordInfo); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_common_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*Message); 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{
@@ -2830,7 +3110,7 @@ func file_common_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_common_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   30,
+			NumMessages:   33,
 			NumExtensions: 0,
 			NumServices:   0,
 		},

+ 21 - 0
api/common/common.proto

@@ -220,4 +220,25 @@ message OnlinePersonInfo{
   string province = 9;// 省
   string city = 10;// 市
   string area = 11;// 区
+}
+
+message ChatRecordListReply{
+  repeated ChatRecordInfo list = 1;
+  int64 nextId = 2;
+}
+
+message ChatRecordInfo{
+  int64 messageId = 1; // 消息的ID
+  string msgType = 2;  // 消息类型
+  Message message = 3; // 消息的结构
+  int64 roomId = 4;    // 房间ID
+  bool isSelf = 5;     // 是否是自己
+  int64 sendTime = 6;  // 发送时间
+  string status = 7;   // 消息状态
+}
+
+message Message{
+  string content = 1; // 文本内容
+  string materialUrl = 2; // 素材链接
+  int64 second = 3;// 音频的秒数
 }

+ 12 - 0
define/chat.go

@@ -4,3 +4,15 @@ var (
 	TypeUserNew = "new"
 	TypeUserPay = "pay"
 )
+
+var (
+	ChatMessageSuccess   = "success"   // 成功
+	ChatMessageFail      = "fail"      // 失败
+	ChatMessageViolation = "violation" // 违规
+)
+
+var (
+	ChatTypeText    = "text"    // 文本
+	ChatTypeVoice   = "voice"   // 音频
+	ChatTypePicture = "picture" // 图片
+)

+ 8 - 0
errors/chat.go

@@ -0,0 +1,8 @@
+package errors
+
+import "git.ikuban.com/server/kratos-utils/codes"
+
+var (
+	ErrorRoomNotExist        = codes.Error(40001, "聊天不存在")
+	ErrorRoomNotBelongPerson = codes.Error(40002, "聊天不属于该用户")
+)

+ 9 - 0
js/api/chat/chat_pb.ts

@@ -89,4 +89,13 @@ export interface CheckUserPartnerIsRelationshipReply{
 export interface RoomReply{
     roomId?:number;
 }
+export interface FindChatRecordListRequest{
+    nextId?:number;
+    offset?:number;
+    roomId?:number;
+    /**  类型 */
+    personType?:string;
+    /**  查询目标的ID */
+    personID?:string;
+}
 

+ 28 - 0
js/api/common/common_pb.ts

@@ -272,4 +272,32 @@ export interface OnlinePersonInfo{
     /**  区 */
     area?:string;
 }
+export interface ChatRecordListReply{
+    list?:Array<ChatRecordInfo>;
+    nextId?:number;
+}
+export interface ChatRecordInfo{
+    /**  消息的ID */
+    messageId?:number;
+    /**  消息类型 */
+    msgType?:string;
+    /**  消息的结构 */
+    message?:Message;
+    /**  房间ID */
+    roomId?:number;
+    /**  是否是自己 */
+    isSelf?:boolean;
+    /**  发送时间 */
+    sendTime?:number;
+    /**  消息状态 */
+    status?:string;
+}
+export interface Message{
+    /**  文本内容 */
+    content?:string;
+    /**  素材链接 */
+    materialUrl?:string;
+    /**  音频的秒数 */
+    second?:number;
+}