wfz 3 роки тому
батько
коміт
84382b5455

+ 45 - 45
api/account/account.pb.go

@@ -804,7 +804,7 @@ var file_account_proto_rawDesc = []byte{
 	0x65, 0x22, 0x32, 0x0a, 0x0a, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x6f, 0x6b, 0x65, 0x6e, 0x12,
 	0x10, 0x0a, 0x03, 0x70, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x70, 0x69,
 	0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52,
-	0x04, 0x74, 0x79, 0x70, 0x65, 0x32, 0xd0, 0x0a, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
+	0x04, 0x74, 0x79, 0x70, 0x65, 0x32, 0xd6, 0x0a, 0x0a, 0x07, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e,
 	0x74, 0x12, 0x62, 0x0a, 0x0a, 0x44, 0x65, 0x62, 0x75, 0x67, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x12,
 	0x1e, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x2e, 0x44, 0x65,
 	0x62, 0x75, 0x67, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a,
@@ -875,26 +875,26 @@ var file_account_proto_rawDesc = []byte{
 	0x6d, 0x65, 0x42, 0x79, 0x54, 0x79, 0x70, 0x65, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63,
 	0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d, 0x65, 0x6d, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73,
 	0x74, 0x1a, 0x14, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4d,
-	0x65, 0x6d, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x00, 0x12, 0x49, 0x0a, 0x0d, 0x46, 0x69, 0x6e,
-	0x64, 0x43, 0x68, 0x61, 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x1b, 0x2e, 0x61, 0x70, 0x69,
+	0x65, 0x6d, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x0d, 0x46, 0x69, 0x6e,
+	0x64, 0x43, 0x68, 0x61, 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x12, 0x21, 0x2e, 0x61, 0x70, 0x69,
 	0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x50, 0x61, 0x67, 0x65,
-	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f,
-	0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x54, 0x6f, 0x70, 0x69, 0x63, 0x4c, 0x69,
-	0x73, 0x74, 0x22, 0x00, 0x12, 0x41, 0x0a, 0x0a, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x4d, 0x65,
-	0x6d, 0x65, 0x12, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e,
-	0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x4e, 0x75, 0x6d, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69, 0x2e,
-	0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x65, 0x78,
-	0x74, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x00, 0x12, 0x4f, 0x0a, 0x12, 0x52, 0x61, 0x6e, 0x64, 0x6f,
-	0x6d, 0x53, 0x77, 0x69, 0x66, 0x74, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x12, 0x1b, 0x2e,
-	0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f,
-	0x6d, 0x4e, 0x75, 0x6d, 0x41, 0x6e, 0x64, 0x53, 0x65, 0x78, 0x1a, 0x1a, 0x2e, 0x61, 0x70, 0x69,
-	0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x43, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x54, 0x65,
-	0x78, 0x74, 0x4c, 0x69, 0x73, 0x74, 0x22, 0x00, 0x42, 0x46, 0x0a, 0x0b, 0x61, 0x70, 0x69, 0x2e,
-	0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x50, 0x01, 0x5a, 0x35, 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, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3b, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74,
-	0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x41, 0x6e, 0x64, 0x53, 0x65, 0x78, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e,
+	0x61, 0x70, 0x69, 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x75, 0x6e, 0x74, 0x50, 0x01, 0x5a,
+	0x35, 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, 0x61, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x3b, 0x61,
+	0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -911,30 +911,30 @@ func file_account_proto_rawDescGZIP() []byte {
 
 var file_account_proto_msgTypes = make([]protoimpl.MessageInfo, 12)
 var file_account_proto_goTypes = []interface{}{
-	(*MediaID)(nil),                     // 0: api.account.MediaID
-	(*MaterialLink)(nil),                // 1: api.account.MaterialLink
-	(*RandomNicknameReply)(nil),         // 2: api.account.RandomNicknameReply
-	(*RandomAvatarReply)(nil),           // 3: api.account.RandomAvatarReply
-	(*OpenIDAndAppIDRequest)(nil),       // 4: api.account.OpenIDAndAppIDRequest
-	(*IdentityInfo)(nil),                // 5: api.account.IdentityInfo
-	(*UserInfoDB)(nil),                  // 6: api.account.UserInfoDB
-	(*PartnerInfoDB)(nil),               // 7: api.account.PartnerInfoDB
-	(*AuthorizationRequest)(nil),        // 8: api.account.AuthorizationRequest
-	(*TokenReply)(nil),                  // 9: api.account.TokenReply
-	(*DebugLoginRequest)(nil),           // 10: api.account.DebugLoginRequest
-	(*LoginToken)(nil),                  // 11: api.account.LoginToken
-	(*common.SexReq)(nil),               // 12: api.common.SexReq
-	(*common.PersonParam)(nil),          // 13: api.common.PersonParam
-	(*common.Ids)(nil),                  // 14: api.common.Ids
-	(*common.MemeRequest)(nil),          // 15: api.common.MemeRequest
-	(*common.ListPageRequest)(nil),      // 16: api.common.ListPageRequest
-	(*common.RandomNum)(nil),            // 17: api.common.RandomNum
-	(*common.RandomNumAndSex)(nil),      // 18: api.common.RandomNumAndSex
-	(*common.TagListReply)(nil),         // 19: api.common.TagListReply
-	(*common.RandomIntroduceReply)(nil), // 20: api.common.RandomIntroduceReply
-	(*common.MemeList)(nil),             // 21: api.common.MemeList
-	(*common.ChatTopicList)(nil),        // 22: api.common.ChatTopicList
-	(*common.CommonTextList)(nil),       // 23: api.common.CommonTextList
+	(*MediaID)(nil),                      // 0: api.account.MediaID
+	(*MaterialLink)(nil),                 // 1: api.account.MaterialLink
+	(*RandomNicknameReply)(nil),          // 2: api.account.RandomNicknameReply
+	(*RandomAvatarReply)(nil),            // 3: api.account.RandomAvatarReply
+	(*OpenIDAndAppIDRequest)(nil),        // 4: api.account.OpenIDAndAppIDRequest
+	(*IdentityInfo)(nil),                 // 5: api.account.IdentityInfo
+	(*UserInfoDB)(nil),                   // 6: api.account.UserInfoDB
+	(*PartnerInfoDB)(nil),                // 7: api.account.PartnerInfoDB
+	(*AuthorizationRequest)(nil),         // 8: api.account.AuthorizationRequest
+	(*TokenReply)(nil),                   // 9: api.account.TokenReply
+	(*DebugLoginRequest)(nil),            // 10: api.account.DebugLoginRequest
+	(*LoginToken)(nil),                   // 11: api.account.LoginToken
+	(*common.SexReq)(nil),                // 12: api.common.SexReq
+	(*common.PersonParam)(nil),           // 13: api.common.PersonParam
+	(*common.Ids)(nil),                   // 14: api.common.Ids
+	(*common.MemeRequest)(nil),           // 15: api.common.MemeRequest
+	(*common.ListPageAndSexRequest)(nil), // 16: api.common.ListPageAndSexRequest
+	(*common.RandomNum)(nil),             // 17: api.common.RandomNum
+	(*common.RandomNumAndSex)(nil),       // 18: api.common.RandomNumAndSex
+	(*common.TagListReply)(nil),          // 19: api.common.TagListReply
+	(*common.RandomIntroduceReply)(nil),  // 20: api.common.RandomIntroduceReply
+	(*common.MemeList)(nil),              // 21: api.common.MemeList
+	(*common.ChatTopicList)(nil),         // 22: api.common.ChatTopicList
+	(*common.CommonTextList)(nil),        // 23: api.common.CommonTextList
 }
 var file_account_proto_depIdxs = []int32{
 	10, // 0: api.account.Account.DebugLogin:input_type -> api.account.DebugLoginRequest
@@ -949,7 +949,7 @@ var file_account_proto_depIdxs = []int32{
 	12, // 9: api.account.Account.RandomIntroduce:input_type -> api.common.SexReq
 	0,  // 10: api.account.Account.UploadMaterialVoice:input_type -> api.account.MediaID
 	15, // 11: api.account.Account.FindMemeByType:input_type -> api.common.MemeRequest
-	16, // 12: api.account.Account.FindChatTopic:input_type -> api.common.ListPageRequest
+	16, // 12: api.account.Account.FindChatTopic:input_type -> api.common.ListPageAndSexRequest
 	17, // 13: api.account.Account.RandomMeme:input_type -> api.common.RandomNum
 	18, // 14: api.account.Account.RandomSwiftMessage:input_type -> api.common.RandomNumAndSex
 	9,  // 15: api.account.Account.DebugLogin:output_type -> api.account.TokenReply

+ 2 - 3
api/account/account.proto

@@ -63,13 +63,12 @@ service Account {
   };
   // 通过类型获取表情包列表
   rpc FindMemeByType (common.MemeRequest) returns (common.MemeList){};
-  // 获取聊天话题
-  rpc FindChatTopic (common.ListPageRequest) returns (common.ChatTopicList){};
+  // 获取对方性别的聊天话题
+  rpc FindChatTopic (common.ListPageAndSexRequest) returns (common.ChatTopicList){};
   // 随机表情包
   rpc RandomMeme (common.RandomNum) returns (common.CommonTextList){};
   // 随机打招呼
   rpc RandomSwiftMessage (common.RandomNumAndSex) returns (common.CommonTextList){};
-
 }
 
 message MediaID{

+ 8 - 8
api/account/account_grpc.pb.go

@@ -39,8 +39,8 @@ type AccountClient interface {
 	UploadMaterialVoice(ctx context.Context, in *MediaID, opts ...grpc.CallOption) (*MaterialLink, error)
 	// 通过类型获取表情包列表
 	FindMemeByType(ctx context.Context, in *common.MemeRequest, opts ...grpc.CallOption) (*common.MemeList, error)
-	// 获取聊天话题
-	FindChatTopic(ctx context.Context, in *common.ListPageRequest, opts ...grpc.CallOption) (*common.ChatTopicList, error)
+	// 获取对方性别的聊天话题
+	FindChatTopic(ctx context.Context, in *common.ListPageAndSexRequest, opts ...grpc.CallOption) (*common.ChatTopicList, error)
 	// 随机表情包
 	RandomMeme(ctx context.Context, in *common.RandomNum, opts ...grpc.CallOption) (*common.CommonTextList, error)
 	// 随机打招呼
@@ -163,7 +163,7 @@ func (c *accountClient) FindMemeByType(ctx context.Context, in *common.MemeReque
 	return out, nil
 }
 
-func (c *accountClient) FindChatTopic(ctx context.Context, in *common.ListPageRequest, opts ...grpc.CallOption) (*common.ChatTopicList, error) {
+func (c *accountClient) FindChatTopic(ctx context.Context, in *common.ListPageAndSexRequest, opts ...grpc.CallOption) (*common.ChatTopicList, error) {
 	out := new(common.ChatTopicList)
 	err := c.cc.Invoke(ctx, "/api.account.Account/FindChatTopic", in, out, opts...)
 	if err != nil {
@@ -214,8 +214,8 @@ type AccountServer interface {
 	UploadMaterialVoice(context.Context, *MediaID) (*MaterialLink, error)
 	// 通过类型获取表情包列表
 	FindMemeByType(context.Context, *common.MemeRequest) (*common.MemeList, error)
-	// 获取聊天话题
-	FindChatTopic(context.Context, *common.ListPageRequest) (*common.ChatTopicList, error)
+	// 获取对方性别的聊天话题
+	FindChatTopic(context.Context, *common.ListPageAndSexRequest) (*common.ChatTopicList, error)
 	// 随机表情包
 	RandomMeme(context.Context, *common.RandomNum) (*common.CommonTextList, error)
 	// 随机打招呼
@@ -263,7 +263,7 @@ func (UnimplementedAccountServer) UploadMaterialVoice(context.Context, *MediaID)
 func (UnimplementedAccountServer) FindMemeByType(context.Context, *common.MemeRequest) (*common.MemeList, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method FindMemeByType not implemented")
 }
-func (UnimplementedAccountServer) FindChatTopic(context.Context, *common.ListPageRequest) (*common.ChatTopicList, error) {
+func (UnimplementedAccountServer) FindChatTopic(context.Context, *common.ListPageAndSexRequest) (*common.ChatTopicList, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method FindChatTopic not implemented")
 }
 func (UnimplementedAccountServer) RandomMeme(context.Context, *common.RandomNum) (*common.CommonTextList, error) {
@@ -502,7 +502,7 @@ func _Account_FindMemeByType_Handler(srv interface{}, ctx context.Context, dec f
 }
 
 func _Account_FindChatTopic_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(common.ListPageRequest)
+	in := new(common.ListPageAndSexRequest)
 	if err := dec(in); err != nil {
 		return nil, err
 	}
@@ -514,7 +514,7 @@ func _Account_FindChatTopic_Handler(srv interface{}, ctx context.Context, dec fu
 		FullMethod: "/api.account.Account/FindChatTopic",
 	}
 	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(AccountServer).FindChatTopic(ctx, req.(*common.ListPageRequest))
+		return srv.(AccountServer).FindChatTopic(ctx, req.(*common.ListPageAndSexRequest))
 	}
 	return interceptor(ctx, in, info, handler)
 }

Різницю між файлами не показано, бо вона завелика
+ 334 - 265
api/common/common.pb.go


+ 7 - 0
api/common/common.proto

@@ -145,6 +145,13 @@ message ListPageRequest{
   int64 offset = 2;
 }
 
+message ListPageAndSexRequest{
+  int64 nextId = 1;
+  int64 offset = 2;
+  int64 sex = 3;
+}
+
+
 message ListPage2Request{
   string nextId = 1;
   int64 offset = 2;

+ 1 - 1
js/api/account/account_http_pb.ts

@@ -1,7 +1,7 @@
 // @ts-ignore
 import request from '@/libs/request';
 import {DebugLoginRequest,TokenReply,AuthorizationRequest,RandomNicknameReply,RandomAvatarReply,OpenIDAndAppIDRequest,IdentityInfo,MediaID,MaterialLink} from "./account_pb";
-import {SexReq,PersonParam,TagListReply,Ids,RandomIntroduceReply,MemeRequest,MemeList,ListPageRequest,ChatTopicList,RandomNum,CommonTextList,RandomNumAndSex} from "../common/common_pb";
+import {SexReq,PersonParam,TagListReply,Ids,RandomIntroduceReply,MemeRequest,MemeList,ListPageAndSexRequest,ChatTopicList,RandomNum,CommonTextList,RandomNumAndSex} from "../common/common_pb";
 
 const AccountService = {
   DebugLogin: async (req?: DebugLoginRequest) => {

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

@@ -182,6 +182,11 @@ export interface ListPageRequest{
     nextId?:number;
     offset?:number;
 }
+export interface ListPageAndSexRequest{
+    nextId?:number;
+    offset?:number;
+    sex?:number;
+}
 export interface ListPage2Request{
     nextId?:string;
     offset?:number;

Деякі файли не було показано, через те що забагато файлів було змінено