Răsfoiți Sursa

随机介绍

wfz 3 ani în urmă
părinte
comite
6b15a3351c

+ 28 - 17
api/account/account.pb.go

@@ -785,7 +785,7 @@ var file_account_proto_rawDesc = []byte{
 	0x63, 0x6f, 0x64, 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, 0xa5, 0x06, 0x0a, 0x07, 0x41, 0x63, 0x63,
+	0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x32, 0x90, 0x07, 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,
@@ -836,11 +836,18 @@ var file_account_proto_rawDesc = []byte{
 	0x42, 0x79, 0x49, 0x44, 0x73, 0x12, 0x0f, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
 	0x6f, 0x6e, 0x2e, 0x49, 0x64, 0x73, 0x1a, 0x18, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d,
 	0x6d, 0x6f, 0x6e, 0x2e, 0x54, 0x61, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79,
-	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,
+	0x12, 0x69, 0x0a, 0x0f, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x49, 0x6e, 0x74, 0x72, 0x6f, 0x64,
+	0x75, 0x63, 0x65, 0x12, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
+	0x2e, 0x53, 0x65, 0x78, 0x52, 0x65, 0x71, 0x1a, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f,
+	0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x49, 0x6e, 0x74, 0x72, 0x6f,
+	0x64, 0x75, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x22, 0x20, 0x82, 0xd3, 0xe4, 0x93, 0x02,
+	0x1a, 0x22, 0x15, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x2f, 0x69,
+	0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x3a, 0x01, 0x2a, 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,
 }
 
 var (
@@ -871,7 +878,9 @@ var file_account_proto_goTypes = []interface{}{
 	(*LoginToken)(nil),                          // 11: api.account.LoginToken
 	(*common.FindTagListByGroupNameAndSex)(nil), // 12: api.common.FindTagListByGroupNameAndSex
 	(*common.Ids)(nil),                          // 13: api.common.Ids
-	(*common.TagListReply)(nil),                 // 14: api.common.TagListReply
+	(*common.SexReq)(nil),                       // 14: api.common.SexReq
+	(*common.TagListReply)(nil),                 // 15: api.common.TagListReply
+	(*common.RandomIntroduceReply)(nil),         // 16: api.common.RandomIntroduceReply
 }
 var file_account_proto_depIdxs = []int32{
 	10, // 0: api.account.Account.DebugLogin:input_type -> api.account.DebugLoginRequest
@@ -882,16 +891,18 @@ var file_account_proto_depIdxs = []int32{
 	4,  // 5: api.account.Account.GetIdentityByFromOpenIDAndAppID:input_type -> api.account.OpenIDAndAppIDRequest
 	12, // 6: api.account.Account.FindTagListByGroupNameAndSex:input_type -> api.common.FindTagListByGroupNameAndSex
 	13, // 7: api.account.Account.FindByIDs:input_type -> api.common.Ids
-	9,  // 8: api.account.Account.DebugLogin:output_type -> api.account.TokenReply
-	9,  // 9: api.account.Account.Authorization:output_type -> api.account.TokenReply
-	1,  // 10: api.account.Account.RandomNickname:output_type -> api.account.RandomNicknameReply
-	3,  // 11: api.account.Account.RandomAvatar:output_type -> api.account.RandomAvatarReply
-	5,  // 12: api.account.Account.GetIdentityByOpenIDAndAppID:output_type -> api.account.IdentityInfo
-	5,  // 13: api.account.Account.GetIdentityByFromOpenIDAndAppID:output_type -> api.account.IdentityInfo
-	14, // 14: api.account.Account.FindTagListByGroupNameAndSex:output_type -> api.common.TagListReply
-	14, // 15: api.account.Account.FindByIDs:output_type -> api.common.TagListReply
-	8,  // [8:16] is the sub-list for method output_type
-	0,  // [0:8] is the sub-list for method input_type
+	14, // 8: api.account.Account.RandomIntroduce:input_type -> api.common.SexReq
+	9,  // 9: api.account.Account.DebugLogin:output_type -> api.account.TokenReply
+	9,  // 10: api.account.Account.Authorization:output_type -> api.account.TokenReply
+	1,  // 11: api.account.Account.RandomNickname:output_type -> api.account.RandomNicknameReply
+	3,  // 12: api.account.Account.RandomAvatar:output_type -> api.account.RandomAvatarReply
+	5,  // 13: api.account.Account.GetIdentityByOpenIDAndAppID:output_type -> api.account.IdentityInfo
+	5,  // 14: api.account.Account.GetIdentityByFromOpenIDAndAppID:output_type -> api.account.IdentityInfo
+	15, // 15: api.account.Account.FindTagListByGroupNameAndSex:output_type -> api.common.TagListReply
+	15, // 16: api.account.Account.FindByIDs:output_type -> api.common.TagListReply
+	16, // 17: api.account.Account.RandomIntroduce:output_type -> api.common.RandomIntroduceReply
+	9,  // [9:18] is the sub-list for method output_type
+	0,  // [0:9] is the sub-list for method input_type
 	0,  // [0:0] is the sub-list for extension type_name
 	0,  // [0:0] is the sub-list for extension extendee
 	0,  // [0:0] is the sub-list for field type_name

+ 7 - 0
api/account/account.proto

@@ -45,6 +45,13 @@ service Account {
   rpc FindTagListByGroupNameAndSex (common.FindTagListByGroupNameAndSex) returns (common.TagListReply);
   // 通过标签IDs查询标签
   rpc FindByIDs (common.Ids) returns (common.TagListReply);
+  // 随机介绍接口
+  rpc RandomIntroduce (common.SexReq) returns (common.RandomIntroduceReply){
+    option (google.api.http) = {
+      post: "/api/random/introduce",
+      body:"*"
+    };
+  };
 }
 
 message RandomNicknameRequest{

+ 38 - 0
api/account/account_grpc.pb.go

@@ -31,6 +31,8 @@ type AccountClient interface {
 	FindTagListByGroupNameAndSex(ctx context.Context, in *common.FindTagListByGroupNameAndSex, opts ...grpc.CallOption) (*common.TagListReply, error)
 	// 通过标签IDs查询标签
 	FindByIDs(ctx context.Context, in *common.Ids, opts ...grpc.CallOption) (*common.TagListReply, error)
+	// 随机介绍接口
+	RandomIntroduce(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*common.RandomIntroduceReply, error)
 }
 
 type accountClient struct {
@@ -113,6 +115,15 @@ func (c *accountClient) FindByIDs(ctx context.Context, in *common.Ids, opts ...g
 	return out, nil
 }
 
+func (c *accountClient) RandomIntroduce(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*common.RandomIntroduceReply, error) {
+	out := new(common.RandomIntroduceReply)
+	err := c.cc.Invoke(ctx, "/api.account.Account/RandomIntroduce", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // AccountServer is the server API for Account service.
 // All implementations must embed UnimplementedAccountServer
 // for forward compatibility
@@ -129,6 +140,8 @@ type AccountServer interface {
 	FindTagListByGroupNameAndSex(context.Context, *common.FindTagListByGroupNameAndSex) (*common.TagListReply, error)
 	// 通过标签IDs查询标签
 	FindByIDs(context.Context, *common.Ids) (*common.TagListReply, error)
+	// 随机介绍接口
+	RandomIntroduce(context.Context, *common.SexReq) (*common.RandomIntroduceReply, error)
 	mustEmbedUnimplementedAccountServer()
 }
 
@@ -160,6 +173,9 @@ func (UnimplementedAccountServer) FindTagListByGroupNameAndSex(context.Context,
 func (UnimplementedAccountServer) FindByIDs(context.Context, *common.Ids) (*common.TagListReply, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method FindByIDs not implemented")
 }
+func (UnimplementedAccountServer) RandomIntroduce(context.Context, *common.SexReq) (*common.RandomIntroduceReply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method RandomIntroduce not implemented")
+}
 func (UnimplementedAccountServer) mustEmbedUnimplementedAccountServer() {}
 
 // UnsafeAccountServer may be embedded to opt out of forward compatibility for this service.
@@ -317,6 +333,24 @@ func _Account_FindByIDs_Handler(srv interface{}, ctx context.Context, dec func(i
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Account_RandomIntroduce_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.SexReq)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(AccountServer).RandomIntroduce(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.account.Account/RandomIntroduce",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(AccountServer).RandomIntroduce(ctx, req.(*common.SexReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // Account_ServiceDesc is the grpc.ServiceDesc for Account service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -356,6 +390,10 @@ var Account_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "FindByIDs",
 			Handler:    _Account_FindByIDs_Handler,
 		},
+		{
+			MethodName: "RandomIntroduce",
+			Handler:    _Account_RandomIntroduce_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "account.proto",

+ 44 - 0
api/account/account_http.pb.go

@@ -8,6 +8,7 @@ import (
 	context "context"
 	base "git.ikuban.com/server/base-protobuf/kuban/api/base"
 	reply "git.ikuban.com/server/kratos-utils/http/reply"
+	common "git.ikuban.com/server/pw-protobuf/api/common"
 	http "github.com/go-kratos/kratos/v2/transport/http"
 	binding "github.com/go-kratos/kratos/v2/transport/http/binding"
 	ioutil "io/ioutil"
@@ -29,6 +30,7 @@ type AccountHTTPServer interface {
 	Authorization(context.Context, *AuthorizationRequest) (*TokenReply, error)
 	DebugLogin(context.Context, *DebugLoginRequest) (*TokenReply, error)
 	RandomAvatar(context.Context, *RandomAvatarRequest) (*RandomAvatarReply, error)
+	RandomIntroduce(context.Context, *common.SexReq) (*common.RandomIntroduceReply, error)
 	RandomNickname(context.Context, *RandomNicknameRequest) (*RandomNicknameReply, error)
 }
 
@@ -38,6 +40,7 @@ func RegisterAccountHTTPServer(s *http.Server, srv AccountHTTPServer) {
 	r.POST("/api/login/authorization", _Account_Authorization0_HTTP_Handler(srv))
 	r.POST("/api/random/nickname", _Account_RandomNickname0_HTTP_Handler(srv))
 	r.POST("/api/random/avatar", _Account_RandomAvatar0_HTTP_Handler(srv))
+	r.POST("/api/random/introduce", _Account_RandomIntroduce0_HTTP_Handler(srv))
 }
 
 func _Account_DebugLogin0_HTTP_Handler(srv AccountHTTPServer) func(ctx http.Context) error {
@@ -148,10 +151,38 @@ func _Account_RandomAvatar0_HTTP_Handler(srv AccountHTTPServer) func(ctx http.Co
 	}
 }
 
+func _Account_RandomIntroduce0_HTTP_Handler(srv AccountHTTPServer) func(ctx http.Context) error {
+	return func(ctx http.Context) error {
+		var in common.SexReq
+		if err := ctx.Bind(&in); err != nil {
+			return err
+		}
+		if err := ctx.BindQuery(&in); err != nil {
+			return err
+		}
+		http.SetOperation(ctx, "/api.account.Account/RandomIntroduce")
+		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
+			return srv.RandomIntroduce(ctx, req.(*common.SexReq))
+		})
+		out, err := h(ctx, &in)
+		if err != nil {
+			return err
+		}
+		success := &reply.SuccessReply{
+			Code: 0,
+		}
+		if out != nil {
+			success.Data = out
+		}
+		return ctx.Result(200, success)
+	}
+}
+
 type AccountHTTPClient interface {
 	Authorization(ctx context.Context, req *AuthorizationRequest, opts ...http.CallOption) (rsp *TokenReply, err error)
 	DebugLogin(ctx context.Context, req *DebugLoginRequest, opts ...http.CallOption) (rsp *TokenReply, err error)
 	RandomAvatar(ctx context.Context, req *RandomAvatarRequest, opts ...http.CallOption) (rsp *RandomAvatarReply, err error)
+	RandomIntroduce(ctx context.Context, req *common.SexReq, opts ...http.CallOption) (rsp *common.RandomIntroduceReply, err error)
 	RandomNickname(ctx context.Context, req *RandomNicknameRequest, opts ...http.CallOption) (rsp *RandomNicknameReply, err error)
 }
 
@@ -202,6 +233,19 @@ func (c *AccountHTTPClientImpl) RandomAvatar(ctx context.Context, in *RandomAvat
 	return &out, err
 }
 
+func (c *AccountHTTPClientImpl) RandomIntroduce(ctx context.Context, in *common.SexReq, opts ...http.CallOption) (*common.RandomIntroduceReply, error) {
+	var out common.RandomIntroduceReply
+	pattern := "/api/random/introduce"
+	path := binding.EncodeURL(pattern, in, false)
+	opts = append(opts, http.Operation("/api.account.Account/RandomIntroduce"))
+	opts = append(opts, http.PathTemplate(pattern))
+	err := c.cc.Invoke(ctx, "POST", path, in, &out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return &out, err
+}
+
 func (c *AccountHTTPClientImpl) RandomNickname(ctx context.Context, in *RandomNicknameRequest, opts ...http.CallOption) (*RandomNicknameReply, error) {
 	var out RandomNicknameReply
 	pattern := "/api/random/nickname"

+ 133 - 8
api/common/common.pb.go

@@ -1274,6 +1274,100 @@ func (x *TagList) GetName() string {
 	return ""
 }
 
+type SexReq struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Sex int64 `protobuf:"varint,1,opt,name=sex,proto3" json:"sex"`
+}
+
+func (x *SexReq) Reset() {
+	*x = SexReq{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_common_proto_msgTypes[20]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *SexReq) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*SexReq) ProtoMessage() {}
+
+func (x *SexReq) ProtoReflect() protoreflect.Message {
+	mi := &file_common_proto_msgTypes[20]
+	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 SexReq.ProtoReflect.Descriptor instead.
+func (*SexReq) Descriptor() ([]byte, []int) {
+	return file_common_proto_rawDescGZIP(), []int{20}
+}
+
+func (x *SexReq) GetSex() int64 {
+	if x != nil {
+		return x.Sex
+	}
+	return 0
+}
+
+type RandomIntroduceReply struct {
+	state         protoimpl.MessageState
+	sizeCache     protoimpl.SizeCache
+	unknownFields protoimpl.UnknownFields
+
+	Introduce string `protobuf:"bytes,1,opt,name=introduce,proto3" json:"introduce"`
+}
+
+func (x *RandomIntroduceReply) Reset() {
+	*x = RandomIntroduceReply{}
+	if protoimpl.UnsafeEnabled {
+		mi := &file_common_proto_msgTypes[21]
+		ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x))
+		ms.StoreMessageInfo(mi)
+	}
+}
+
+func (x *RandomIntroduceReply) String() string {
+	return protoimpl.X.MessageStringOf(x)
+}
+
+func (*RandomIntroduceReply) ProtoMessage() {}
+
+func (x *RandomIntroduceReply) ProtoReflect() protoreflect.Message {
+	mi := &file_common_proto_msgTypes[21]
+	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 RandomIntroduceReply.ProtoReflect.Descriptor instead.
+func (*RandomIntroduceReply) Descriptor() ([]byte, []int) {
+	return file_common_proto_rawDescGZIP(), []int{21}
+}
+
+func (x *RandomIntroduceReply) GetIntroduce() string {
+	if x != nil {
+		return x.Introduce
+	}
+	return ""
+}
+
 var File_common_proto protoreflect.FileDescriptor
 
 var file_common_proto_rawDesc = []byte{
@@ -1398,12 +1492,17 @@ var file_common_proto_rawDesc = []byte{
 	0x54, 0x61, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x04, 0x6c, 0x69, 0x73, 0x74, 0x22, 0x2d, 0x0a,
 	0x07, 0x54, 0x61, 0x67, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01,
 	0x20, 0x01, 0x28, 0x03, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
-	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 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,
+	0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x1a, 0x0a, 0x06,
+	0x53, 0x65, 0x78, 0x52, 0x65, 0x71, 0x12, 0x10, 0x0a, 0x03, 0x73, 0x65, 0x78, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x03, 0x52, 0x03, 0x73, 0x65, 0x78, 0x22, 0x34, 0x0a, 0x14, 0x52, 0x61, 0x6e, 0x64,
+	0x6f, 0x6d, 0x49, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x52, 0x65, 0x70, 0x6c, 0x79,
+	0x12, 0x1c, 0x0a, 0x09, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x18, 0x01, 0x20,
+	0x01, 0x28, 0x09, 0x52, 0x09, 0x69, 0x6e, 0x74, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 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 (
@@ -1418,7 +1517,7 @@ func file_common_proto_rawDescGZIP() []byte {
 	return file_common_proto_rawDescData
 }
 
-var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 20)
+var file_common_proto_msgTypes = make([]protoimpl.MessageInfo, 22)
 var file_common_proto_goTypes = []interface{}{
 	(*UserAndPartnerIdParam)(nil),        // 0: api.common.UserAndPartnerIdParam
 	(*User1AndUser2IdParam)(nil),         // 1: api.common.User1AndUser2IdParam
@@ -1440,6 +1539,8 @@ var file_common_proto_goTypes = []interface{}{
 	(*FindTagListByGroupNameAndSex)(nil), // 17: api.common.FindTagListByGroupNameAndSex
 	(*TagListReply)(nil),                 // 18: api.common.TagListReply
 	(*TagList)(nil),                      // 19: api.common.TagList
+	(*SexReq)(nil),                       // 20: api.common.SexReq
+	(*RandomIntroduceReply)(nil),         // 21: api.common.RandomIntroduceReply
 }
 var file_common_proto_depIdxs = []int32{
 	19, // 0: api.common.HomeInfo.tagList:type_name -> api.common.TagList
@@ -1698,6 +1799,30 @@ func file_common_proto_init() {
 				return nil
 			}
 		}
+		file_common_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*SexReq); i {
+			case 0:
+				return &v.state
+			case 1:
+				return &v.sizeCache
+			case 2:
+				return &v.unknownFields
+			default:
+				return nil
+			}
+		}
+		file_common_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} {
+			switch v := v.(*RandomIntroduceReply); 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{
@@ -1705,7 +1830,7 @@ func file_common_proto_init() {
 			GoPackagePath: reflect.TypeOf(x{}).PkgPath(),
 			RawDescriptor: file_common_proto_rawDesc,
 			NumEnums:      0,
-			NumMessages:   20,
+			NumMessages:   22,
 			NumExtensions: 0,
 			NumServices:   0,
 		},

+ 8 - 0
api/common/common.proto

@@ -129,4 +129,12 @@ message TagListReply{
 message TagList{
   int64 id = 1; // 标签ID
   string name = 2;// 分组名
+}
+
+message SexReq{
+  int64 sex = 1;
+}
+
+message RandomIntroduceReply{
+  string introduce = 1;
 }

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

@@ -1,7 +1,7 @@
 // @ts-ignore
 import request from '@/libs/request';
 import {DebugLoginRequest,TokenReply,AuthorizationRequest,RandomNicknameRequest,RandomNicknameReply,RandomAvatarRequest,RandomAvatarReply,OpenIDAndAppIDRequest,IdentityInfo} from "./account_pb";
-import {FindTagListByGroupNameAndSex,TagListReply,Ids} from "../common/common_pb";
+import {FindTagListByGroupNameAndSex,TagListReply,Ids,SexReq,RandomIntroduceReply} from "../common/common_pb";
 
 const AccountService = {
   DebugLogin: async (req?: DebugLoginRequest) => {
@@ -20,6 +20,11 @@ const AccountService = {
 	const res = await request.post<{ data: RandomAvatarReply, code: string, message: string }>('/api/random/avatar', req);
     return res.data.data;
   },
+  /**  随机介绍接口 */
+  RandomIntroduce: async (req?: SexReq) => {
+	const res = await request.post<{ data: RandomIntroduceReply, code: string, message: string }>('/api/random/introduce', req);
+    return res.data.data;
+  },
 
 };
 

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

@@ -141,4 +141,10 @@ export interface TagList{
     /**  分组名 */
     name?:string;
 }
+export interface SexReq{
+    sex?:number;
+}
+export interface RandomIntroduceReply{
+    introduce?:string;
+}