Ver código fonte

随机速配

wfz 3 anos atrás
pai
commit
bf178a8a1a

+ 84 - 74
api/user/user.pb.go

@@ -1745,7 +1745,7 @@ var file_user_proto_rawDesc = []byte{
 	0x09, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x22, 0x2a, 0x0a, 0x10, 0x50, 0x61, 0x79,
 	0x43, 0x61, 0x6c, 0x6c, 0x62, 0x61, 0x63, 0x6b, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x16, 0x0a,
 	0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x06, 0x72,
-	0x65, 0x73, 0x75, 0x6c, 0x74, 0x32, 0xa0, 0x36, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x7e,
+	0x65, 0x73, 0x75, 0x6c, 0x74, 0x32, 0x91, 0x37, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x7e,
 	0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f,
 	0x72, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f,
 	0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x49, 0x6e, 0x66, 0x6f, 0x72,
@@ -2179,11 +2179,18 @@ var file_user_proto_rawDesc = []byte{
 	0x74, 0x79, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x55, 0x73,
 	0x65, 0x72, 0x46, 0x72, 0x65, 0x65, 0x4e, 0x75, 0x6d, 0x22, 0x1d, 0x82, 0xd3, 0xe4, 0x93, 0x02,
 	0x17, 0x22, 0x12, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x66, 0x72, 0x65,
-	0x65, 0x2f, 0x6e, 0x75, 0x6d, 0x3a, 0x01, 0x2a, 0x42, 0x3d, 0x0a, 0x08, 0x61, 0x70, 0x69, 0x2e,
-	0x75, 0x73, 0x65, 0x72, 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, 0x69, 0x2f, 0x75, 0x73,
-	0x65, 0x72, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
+	0x65, 0x2f, 0x6e, 0x75, 0x6d, 0x3a, 0x01, 0x2a, 0x12, 0x6f, 0x0a, 0x11, 0x47, 0x65, 0x74, 0x52,
+	0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 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, 0x68, 0x61, 0x74, 0x2e, 0x47, 0x65, 0x74,
+	0x52, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x4d, 0x61, 0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x52, 0x65,
+	0x70, 0x6c, 0x79, 0x22, 0x24, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1e, 0x22, 0x19, 0x2f, 0x61, 0x70,
+	0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x72, 0x61, 0x6e, 0x64, 0x6f, 0x6d, 0x2f, 0x6d, 0x61,
+	0x74, 0x63, 0x68, 0x69, 0x6e, 0x67, 0x3a, 0x01, 0x2a, 0x42, 0x3d, 0x0a, 0x08, 0x61, 0x70, 0x69,
+	0x2e, 0x75, 0x73, 0x65, 0x72, 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, 0x69, 0x2f, 0x75,
+	0x73, 0x65, 0x72, 0x3b, 0x75, 0x73, 0x65, 0x72, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -2276,6 +2283,7 @@ var file_user_proto_goTypes = []interface{}{
 	(*common.ScripInfo)(nil),                         // 73: api.common.ScripInfo
 	(*common.ChatRecordInfo)(nil),                    // 74: api.common.ChatRecordInfo
 	(*chat.WindowInfo)(nil),                          // 75: api.chat.WindowInfo
+	(*chat.GetRandomMatchingReply)(nil),              // 76: api.chat.GetRandomMatchingReply
 }
 var file_user_proto_depIdxs = []int32{
 	23, // 0: api.user.ReplyScripRequest.message:type_name -> api.common.Message
@@ -2349,74 +2357,76 @@ var file_user_proto_depIdxs = []int32{
 	48, // 68: api.user.User.UpdateLastScripID:input_type -> api.common.UpdateLastScripIDRequest
 	26, // 69: api.user.User.GetWindowInfo:input_type -> google.protobuf.Empty
 	26, // 70: api.user.User.GetUserFreeNum:input_type -> google.protobuf.Empty
-	26, // 71: api.user.User.UpdateUserInformation:output_type -> google.protobuf.Empty
-	15, // 72: api.user.User.GetUserInfo:output_type -> api.user.UserInfo
-	49, // 73: api.user.User.GetUserDBMsg:output_type -> api.common.PersonMsg
-	26, // 74: api.user.User.SendPhoneCode:output_type -> google.protobuf.Empty
-	26, // 75: api.user.User.CheckPhoneCode:output_type -> google.protobuf.Empty
-	50, // 76: api.user.User.CheckUserPartnerIsRelationship:output_type -> api.chat.CheckUserPartnerIsRelationshipReply
-	51, // 77: api.user.User.CreateUserPersonRoom:output_type -> api.chat.RoomReply
-	52, // 78: api.user.User.GetPartnerCircleInfo:output_type -> api.common.AddFriendMessageInfo
-	53, // 79: api.user.User.UserGetHomeInfo:output_type -> api.common.HomeInfo
-	54, // 80: api.user.User.FindUserDBList:output_type -> api.common.PersonDBReply
-	55, // 81: api.user.User.FindLookList:output_type -> api.statistics.LookAndLikeListReply
-	55, // 82: api.user.User.FindLikeList:output_type -> api.statistics.LookAndLikeListReply
-	55, // 83: api.user.User.FindLikedList:output_type -> api.statistics.LookAndLikeListReply
-	56, // 84: api.user.User.GetLookAndLikeStatisticsMessage:output_type -> api.statistics.LookAndLikeMessageReply
-	57, // 85: api.user.User.WxConf:output_type -> api.common.WxConfResponse
-	58, // 86: api.user.User.FindTagListBySex:output_type -> api.common.TagListReply
-	59, // 87: api.user.User.FindOnlineList:output_type -> api.common.RecommendPersonListReply
-	13, // 88: api.user.User.FindWithinSevenDayRoomList:output_type -> api.user.UserFindChatListReply
-	13, // 89: api.user.User.FindOverSevenDayRoomList:output_type -> api.user.UserFindChatListReply
-	60, // 90: api.user.User.UserGetPersonLikedAndLooked:output_type -> api.common.LookedAndLikedNum
-	12, // 91: api.user.User.GetUserBalance:output_type -> api.user.UserBalance
-	61, // 92: api.user.User.GetUserLookNum:output_type -> api.statistics.LookMessageReply
-	62, // 93: api.user.User.FindChatRecordList:output_type -> api.common.ChatRecordListReply
-	63, // 94: api.user.User.FindChatRoomMsg:output_type -> api.common.ChatRoomMsg
-	64, // 95: api.user.User.GetUserIsLike:output_type -> api.common.IsLike
-	26, // 96: api.user.User.UserFinishInformation:output_type -> google.protobuf.Empty
-	11, // 97: api.user.User.UserInformationStatus:output_type -> api.user.InformationStatus
-	26, // 98: api.user.User.UserGetInformationAward:output_type -> google.protobuf.Empty
-	65, // 99: api.user.User.UserGetChatCard:output_type -> api.common.ChatCardInfo
-	26, // 100: api.user.User.UserLike:output_type -> google.protobuf.Empty
-	26, // 101: api.user.User.UserUnLike:output_type -> google.protobuf.Empty
-	26, // 102: api.user.User.UnlockLookRecord:output_type -> google.protobuf.Empty
-	26, // 103: api.user.User.SendMsgReduceCredit:output_type -> google.protobuf.Empty
-	26, // 104: api.user.User.LookBackScripReduceCredit:output_type -> google.protobuf.Empty
-	26, // 105: api.user.User.CreateScripReduceCredit:output_type -> google.protobuf.Empty
-	26, // 106: api.user.User.ReplyScripReduceCredit:output_type -> google.protobuf.Empty
-	26, // 107: api.user.User.UnlockVoiceCredit:output_type -> google.protobuf.Empty
-	26, // 108: api.user.User.UnlockPictureCredit:output_type -> google.protobuf.Empty
-	26, // 109: api.user.User.MatchingCredit:output_type -> google.protobuf.Empty
-	66, // 110: api.user.User.FindMemeByType:output_type -> api.common.MemeList
-	67, // 111: api.user.User.FindChatTopic:output_type -> api.common.ChatTopicList
-	68, // 112: api.user.User.RandomMeme:output_type -> api.common.CommonTextList
-	68, // 113: api.user.User.RandomSwiftMessage:output_type -> api.common.CommonTextList
-	69, // 114: api.user.User.FindMemeTitle:output_type -> api.common.MemeTitleList
-	26, // 115: api.user.User.UserSetBlackChat:output_type -> google.protobuf.Empty
-	26, // 116: api.user.User.UserDeleteChat:output_type -> google.protobuf.Empty
-	69, // 117: api.user.User.FindChatTopicTitle:output_type -> api.common.MemeTitleList
-	18, // 118: api.user.User.UserRecharge:output_type -> api.user.PayInfo
-	9,  // 119: api.user.User.FindRechargeList:output_type -> api.user.RechargeList
-	20, // 120: api.user.User.FindPayList:output_type -> api.user.PayOrderList
-	26, // 121: api.user.User.Report:output_type -> google.protobuf.Empty
-	54, // 122: api.user.User.FindRecommendUserDBList:output_type -> api.common.PersonDBReply
-	59, // 123: api.user.User.FindRecommendPersonList:output_type -> api.common.RecommendPersonListReply
-	70, // 124: api.user.User.FindOverSevenDayAvatar:output_type -> api.common.FindOverSevenDayAvatarReply
-	6,  // 125: api.user.User.FindMatchingAvatarAndNum:output_type -> api.user.FindMatchingAvatarAndNumReply
-	71, // 126: api.user.User.CreateScrip:output_type -> api.common.ScripID
-	26, // 127: api.user.User.DeleteScrip:output_type -> google.protobuf.Empty
-	72, // 128: api.user.User.FindMyScrip:output_type -> api.common.ScripReply
-	72, // 129: api.user.User.FindOtherScrip:output_type -> api.common.ScripReply
-	72, // 130: api.user.User.FindRecommendScrip:output_type -> api.common.ScripReply
-	26, // 131: api.user.User.PersonLookScrip:output_type -> google.protobuf.Empty
-	73, // 132: api.user.User.PersonClickLookBack:output_type -> api.common.ScripInfo
-	74, // 133: api.user.User.PersonReplyScrip:output_type -> api.common.ChatRecordInfo
-	26, // 134: api.user.User.UpdateLastScripID:output_type -> google.protobuf.Empty
-	75, // 135: api.user.User.GetWindowInfo:output_type -> api.chat.WindowInfo
-	0,  // 136: api.user.User.GetUserFreeNum:output_type -> api.user.UserFreeNum
-	71, // [71:137] is the sub-list for method output_type
-	5,  // [5:71] is the sub-list for method input_type
+	36, // 71: api.user.User.GetRandomMatching:input_type -> api.common.SexReq
+	26, // 72: api.user.User.UpdateUserInformation:output_type -> google.protobuf.Empty
+	15, // 73: api.user.User.GetUserInfo:output_type -> api.user.UserInfo
+	49, // 74: api.user.User.GetUserDBMsg:output_type -> api.common.PersonMsg
+	26, // 75: api.user.User.SendPhoneCode:output_type -> google.protobuf.Empty
+	26, // 76: api.user.User.CheckPhoneCode:output_type -> google.protobuf.Empty
+	50, // 77: api.user.User.CheckUserPartnerIsRelationship:output_type -> api.chat.CheckUserPartnerIsRelationshipReply
+	51, // 78: api.user.User.CreateUserPersonRoom:output_type -> api.chat.RoomReply
+	52, // 79: api.user.User.GetPartnerCircleInfo:output_type -> api.common.AddFriendMessageInfo
+	53, // 80: api.user.User.UserGetHomeInfo:output_type -> api.common.HomeInfo
+	54, // 81: api.user.User.FindUserDBList:output_type -> api.common.PersonDBReply
+	55, // 82: api.user.User.FindLookList:output_type -> api.statistics.LookAndLikeListReply
+	55, // 83: api.user.User.FindLikeList:output_type -> api.statistics.LookAndLikeListReply
+	55, // 84: api.user.User.FindLikedList:output_type -> api.statistics.LookAndLikeListReply
+	56, // 85: api.user.User.GetLookAndLikeStatisticsMessage:output_type -> api.statistics.LookAndLikeMessageReply
+	57, // 86: api.user.User.WxConf:output_type -> api.common.WxConfResponse
+	58, // 87: api.user.User.FindTagListBySex:output_type -> api.common.TagListReply
+	59, // 88: api.user.User.FindOnlineList:output_type -> api.common.RecommendPersonListReply
+	13, // 89: api.user.User.FindWithinSevenDayRoomList:output_type -> api.user.UserFindChatListReply
+	13, // 90: api.user.User.FindOverSevenDayRoomList:output_type -> api.user.UserFindChatListReply
+	60, // 91: api.user.User.UserGetPersonLikedAndLooked:output_type -> api.common.LookedAndLikedNum
+	12, // 92: api.user.User.GetUserBalance:output_type -> api.user.UserBalance
+	61, // 93: api.user.User.GetUserLookNum:output_type -> api.statistics.LookMessageReply
+	62, // 94: api.user.User.FindChatRecordList:output_type -> api.common.ChatRecordListReply
+	63, // 95: api.user.User.FindChatRoomMsg:output_type -> api.common.ChatRoomMsg
+	64, // 96: api.user.User.GetUserIsLike:output_type -> api.common.IsLike
+	26, // 97: api.user.User.UserFinishInformation:output_type -> google.protobuf.Empty
+	11, // 98: api.user.User.UserInformationStatus:output_type -> api.user.InformationStatus
+	26, // 99: api.user.User.UserGetInformationAward:output_type -> google.protobuf.Empty
+	65, // 100: api.user.User.UserGetChatCard:output_type -> api.common.ChatCardInfo
+	26, // 101: api.user.User.UserLike:output_type -> google.protobuf.Empty
+	26, // 102: api.user.User.UserUnLike:output_type -> google.protobuf.Empty
+	26, // 103: api.user.User.UnlockLookRecord:output_type -> google.protobuf.Empty
+	26, // 104: api.user.User.SendMsgReduceCredit:output_type -> google.protobuf.Empty
+	26, // 105: api.user.User.LookBackScripReduceCredit:output_type -> google.protobuf.Empty
+	26, // 106: api.user.User.CreateScripReduceCredit:output_type -> google.protobuf.Empty
+	26, // 107: api.user.User.ReplyScripReduceCredit:output_type -> google.protobuf.Empty
+	26, // 108: api.user.User.UnlockVoiceCredit:output_type -> google.protobuf.Empty
+	26, // 109: api.user.User.UnlockPictureCredit:output_type -> google.protobuf.Empty
+	26, // 110: api.user.User.MatchingCredit:output_type -> google.protobuf.Empty
+	66, // 111: api.user.User.FindMemeByType:output_type -> api.common.MemeList
+	67, // 112: api.user.User.FindChatTopic:output_type -> api.common.ChatTopicList
+	68, // 113: api.user.User.RandomMeme:output_type -> api.common.CommonTextList
+	68, // 114: api.user.User.RandomSwiftMessage:output_type -> api.common.CommonTextList
+	69, // 115: api.user.User.FindMemeTitle:output_type -> api.common.MemeTitleList
+	26, // 116: api.user.User.UserSetBlackChat:output_type -> google.protobuf.Empty
+	26, // 117: api.user.User.UserDeleteChat:output_type -> google.protobuf.Empty
+	69, // 118: api.user.User.FindChatTopicTitle:output_type -> api.common.MemeTitleList
+	18, // 119: api.user.User.UserRecharge:output_type -> api.user.PayInfo
+	9,  // 120: api.user.User.FindRechargeList:output_type -> api.user.RechargeList
+	20, // 121: api.user.User.FindPayList:output_type -> api.user.PayOrderList
+	26, // 122: api.user.User.Report:output_type -> google.protobuf.Empty
+	54, // 123: api.user.User.FindRecommendUserDBList:output_type -> api.common.PersonDBReply
+	59, // 124: api.user.User.FindRecommendPersonList:output_type -> api.common.RecommendPersonListReply
+	70, // 125: api.user.User.FindOverSevenDayAvatar:output_type -> api.common.FindOverSevenDayAvatarReply
+	6,  // 126: api.user.User.FindMatchingAvatarAndNum:output_type -> api.user.FindMatchingAvatarAndNumReply
+	71, // 127: api.user.User.CreateScrip:output_type -> api.common.ScripID
+	26, // 128: api.user.User.DeleteScrip:output_type -> google.protobuf.Empty
+	72, // 129: api.user.User.FindMyScrip:output_type -> api.common.ScripReply
+	72, // 130: api.user.User.FindOtherScrip:output_type -> api.common.ScripReply
+	72, // 131: api.user.User.FindRecommendScrip:output_type -> api.common.ScripReply
+	26, // 132: api.user.User.PersonLookScrip:output_type -> google.protobuf.Empty
+	73, // 133: api.user.User.PersonClickLookBack:output_type -> api.common.ScripInfo
+	74, // 134: api.user.User.PersonReplyScrip:output_type -> api.common.ChatRecordInfo
+	26, // 135: api.user.User.UpdateLastScripID:output_type -> google.protobuf.Empty
+	75, // 136: api.user.User.GetWindowInfo:output_type -> api.chat.WindowInfo
+	0,  // 137: api.user.User.GetUserFreeNum:output_type -> api.user.UserFreeNum
+	76, // 138: api.user.User.GetRandomMatching:output_type -> api.chat.GetRandomMatchingReply
+	72, // [72:139] is the sub-list for method output_type
+	5,  // [5:72] is the sub-list for method input_type
 	5,  // [5:5] is the sub-list for extension type_name
 	5,  // [5:5] is the sub-list for extension extendee
 	0,  // [0:5] is the sub-list for field type_name

+ 7 - 0
api/user/user.proto

@@ -428,6 +428,13 @@ service User {
       body:"*"
     };
   };
+  // 随机速配
+  rpc GetRandomMatching (common.SexReq) returns (chat.GetRandomMatchingReply){
+    option (google.api.http) = {
+      post: "/api/user/random/matching",
+      body:"*"
+    };
+  };
 }
 
 message UserFreeNum{

+ 38 - 0
api/user/user_grpc.pb.go

@@ -154,6 +154,8 @@ type UserClient interface {
 	GetWindowInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*chat.WindowInfo, error)
 	// 用户的每日免费数
 	GetUserFreeNum(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UserFreeNum, error)
+	// 随机速配
+	GetRandomMatching(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*chat.GetRandomMatchingReply, error)
 }
 
 type userClient struct {
@@ -758,6 +760,15 @@ func (c *userClient) GetUserFreeNum(ctx context.Context, in *emptypb.Empty, opts
 	return out, nil
 }
 
+func (c *userClient) GetRandomMatching(ctx context.Context, in *common.SexReq, opts ...grpc.CallOption) (*chat.GetRandomMatchingReply, error) {
+	out := new(chat.GetRandomMatchingReply)
+	err := c.cc.Invoke(ctx, "/api.user.User/GetRandomMatching", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // UserServer is the server API for User service.
 // All implementations must embed UnimplementedUserServer
 // for forward compatibility
@@ -894,6 +905,8 @@ type UserServer interface {
 	GetWindowInfo(context.Context, *emptypb.Empty) (*chat.WindowInfo, error)
 	// 用户的每日免费数
 	GetUserFreeNum(context.Context, *emptypb.Empty) (*UserFreeNum, error)
+	// 随机速配
+	GetRandomMatching(context.Context, *common.SexReq) (*chat.GetRandomMatchingReply, error)
 	mustEmbedUnimplementedUserServer()
 }
 
@@ -1099,6 +1112,9 @@ func (UnimplementedUserServer) GetWindowInfo(context.Context, *emptypb.Empty) (*
 func (UnimplementedUserServer) GetUserFreeNum(context.Context, *emptypb.Empty) (*UserFreeNum, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method GetUserFreeNum not implemented")
 }
+func (UnimplementedUserServer) GetRandomMatching(context.Context, *common.SexReq) (*chat.GetRandomMatchingReply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method GetRandomMatching not implemented")
+}
 func (UnimplementedUserServer) mustEmbedUnimplementedUserServer() {}
 
 // UnsafeUserServer may be embedded to opt out of forward compatibility for this service.
@@ -2300,6 +2316,24 @@ func _User_GetUserFreeNum_Handler(srv interface{}, ctx context.Context, dec func
 	return interceptor(ctx, in, info, handler)
 }
 
+func _User_GetRandomMatching_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.(UserServer).GetRandomMatching(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.user.User/GetRandomMatching",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserServer).GetRandomMatching(ctx, req.(*common.SexReq))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // User_ServiceDesc is the grpc.ServiceDesc for User service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -2571,6 +2605,10 @@ var User_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "GetUserFreeNum",
 			Handler:    _User_GetUserFreeNum_Handler,
 		},
+		{
+			MethodName: "GetRandomMatching",
+			Handler:    _User_GetRandomMatching_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "user.proto",

+ 43 - 0
api/user/user_http.pb.go

@@ -58,6 +58,7 @@ type UserHTTPServer interface {
 	FindWithinSevenDayRoomList(context.Context, *common.ListPageRequest) (*UserFindChatListReply, error)
 	GetLookAndLikeStatisticsMessage(context.Context, *emptypb.Empty) (*statistics.LookAndLikeMessageReply, error)
 	GetPartnerCircleInfo(context.Context, *KeyRequest) (*common.AddFriendMessageInfo, error)
+	GetRandomMatching(context.Context, *common.SexReq) (*chat.GetRandomMatchingReply, error)
 	GetUserBalance(context.Context, *emptypb.Empty) (*UserBalance, error)
 	GetUserFreeNum(context.Context, *emptypb.Empty) (*UserFreeNum, error)
 	GetUserInfo(context.Context, *emptypb.Empty) (*UserInfo, error)
@@ -146,6 +147,7 @@ func RegisterUserHTTPServer(s *http.Server, srv UserHTTPServer) {
 	r.POST("/api/user/scrip/last/update", _User_UpdateLastScripID0_HTTP_Handler(srv))
 	r.POST("/api/user/chat/window/get", _User_GetWindowInfo0_HTTP_Handler(srv))
 	r.POST("/api/user/free/num", _User_GetUserFreeNum0_HTTP_Handler(srv))
+	r.POST("/api/user/random/matching", _User_GetRandomMatching0_HTTP_Handler(srv))
 }
 
 func _User_UpdateUserInformation0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Context) error {
@@ -1660,6 +1662,33 @@ func _User_GetUserFreeNum0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Contex
 	}
 }
 
+func _User_GetRandomMatching0_HTTP_Handler(srv UserHTTPServer) 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.user.User/GetRandomMatching")
+		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
+			return srv.GetRandomMatching(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 UserHTTPClient interface {
 	CheckPhoneCode(ctx context.Context, req *common.CheckPhoneCodeRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
 	CheckUserPartnerIsRelationship(ctx context.Context, req *common.PartnerIDParam, opts ...http.CallOption) (rsp *chat.CheckUserPartnerIsRelationshipReply, err error)
@@ -1689,6 +1718,7 @@ type UserHTTPClient interface {
 	FindWithinSevenDayRoomList(ctx context.Context, req *common.ListPageRequest, opts ...http.CallOption) (rsp *UserFindChatListReply, err error)
 	GetLookAndLikeStatisticsMessage(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *statistics.LookAndLikeMessageReply, err error)
 	GetPartnerCircleInfo(ctx context.Context, req *KeyRequest, opts ...http.CallOption) (rsp *common.AddFriendMessageInfo, err error)
+	GetRandomMatching(ctx context.Context, req *common.SexReq, opts ...http.CallOption) (rsp *chat.GetRandomMatchingReply, err error)
 	GetUserBalance(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *UserBalance, err error)
 	GetUserFreeNum(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *UserFreeNum, err error)
 	GetUserInfo(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *UserInfo, err error)
@@ -2091,6 +2121,19 @@ func (c *UserHTTPClientImpl) GetPartnerCircleInfo(ctx context.Context, in *KeyRe
 	return &out, err
 }
 
+func (c *UserHTTPClientImpl) GetRandomMatching(ctx context.Context, in *common.SexReq, opts ...http.CallOption) (*chat.GetRandomMatchingReply, error) {
+	var out chat.GetRandomMatchingReply
+	pattern := "/api/user/random/matching"
+	path := binding.EncodeURL(pattern, in, false)
+	opts = append(opts, http.Operation("/api.user.User/GetRandomMatching"))
+	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 *UserHTTPClientImpl) GetUserBalance(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*UserBalance, error) {
 	var out UserBalance
 	pattern := "/api/user/balance"

+ 6 - 1
js/api/user/user_http_pb.ts

@@ -2,7 +2,7 @@
 import request from '@/libs/request';
 import {UpdateInformationRequest,PersonIDParam,PersonMsg,SendPhoneCodeRequest,CheckPhoneCodeRequest,PartnerIDParam,CreateChatRoomParam,AddFriendMessageInfo,PersonParam,HomeInfo,PersonIDList,PersonDBReply,ListPageRequest,WxConfReq,WxConfResponse,SexReq,TagListReply,ListPage2Request,RecommendPersonListReply,LookedAndLikedNum,FindChatRecordListRequest,ChatRecordListReply,FindChatRoomMsgRequest,ChatRoomMsg,IsLike,ChatCardInfo,MemeRequest,MemeList,FindChatTopicRequest,ChatTopicList,RandomNum,CommonTextList,RandomNumAndSex,MemeTitleList,RoomIDRequest,ReportChatRequest,FindRecommendRequest,FindOverSevenDayAvatarReply,ScripID,ScripReply,FindScripRequest,ScripInfo,ChatRecordInfo,UpdateLastScripIDRequest} from "../common/common_pb";
 import {UserInfo,KeyRequest,UserFindChatListReply,UserBalance,InformationStatus,UserRechargeRequest,PayInfo,RechargeList,FindPayOrderListRequest,PayOrderList,FindRecommendPersonListRequest,FindMatchingAvatarAndNumReply,CreateScripRequest,DeleteScripRequest,UserFindScripRequest,PersonLookScripRequest,ReplyScripRequest,UserFreeNum} from "./user_pb";
-import {CheckUserPartnerIsRelationshipReply,RoomReply,WindowInfo} from "../chat/chat_pb";
+import {CheckUserPartnerIsRelationshipReply,RoomReply,WindowInfo,GetRandomMatchingReply} from "../chat/chat_pb";
 import {LookAndLikeListReply,LookAndLikeMessageReply,LookMessageReply} from "../statistics/statistics_pb";
 
 const UserService = {
@@ -286,6 +286,11 @@ const UserService = {
 	const res = await request.post<{ data: UserFreeNum, code: string, message: string }>('/api/user/free/num', req);
     return res.data.data;
   },
+  /**  随机速配 */
+  GetRandomMatching: async (req?: SexReq) => {
+	const res = await request.post<{ data: GetRandomMatchingReply, code: string, message: string }>('/api/user/random/matching', req);
+    return res.data.data;
+  },
 
 };