Explorar el Código

我喜欢的和喜欢我的的列表

wfz hace 3 años
padre
commit
b6e8b0c288

+ 35 - 19
api/statistics/statistics.pb.go

@@ -609,7 +609,7 @@ var file_statistics_proto_rawDesc = []byte{
 	0x09, 0x52, 0x0a, 0x62, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x44, 0x12, 0x22, 0x0a,
 	0x0c, 0x62, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x54, 0x79, 0x70, 0x65, 0x18, 0x04, 0x20,
 	0x01, 0x28, 0x09, 0x52, 0x0c, 0x62, 0x65, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x54, 0x79, 0x70,
-	0x65, 0x32, 0xa4, 0x06, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73,
+	0x65, 0x32, 0xe7, 0x07, 0x0a, 0x0a, 0x53, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73,
 	0x12, 0x43, 0x0a, 0x0a, 0x4c, 0x6f, 0x6f, 0x6b, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x12, 0x1d,
 	0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e,
 	0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x1a, 0x16, 0x2e,
@@ -659,13 +659,25 @@ var file_statistics_proto_rawDesc = []byte{
 	0x41, 0x6e, 0x64, 0x4c, 0x69, 0x6b, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75, 0x65,
 	0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74,
 	0x69, 0x63, 0x73, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x41, 0x6e, 0x64, 0x4c, 0x69, 0x6b, 0x65, 0x4c,
-	0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x42, 0x4f, 0x0a, 0x0e, 0x61, 0x70, 0x69, 0x2e,
-	0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x50, 0x01, 0x5a, 0x3b, 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, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x3b, 0x73,
-	0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
-	0x33,
+	0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x5f, 0x0a, 0x0c, 0x46, 0x69, 0x6e, 0x64,
+	0x4c, 0x69, 0x6b, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73,
+	0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4c, 0x6f, 0x6f,
+	0x6b, 0x41, 0x6e, 0x64, 0x4c, 0x69, 0x6b, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x71, 0x75,
+	0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73,
+	0x74, 0x69, 0x63, 0x73, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x41, 0x6e, 0x64, 0x4c, 0x69, 0x6b, 0x65,
+	0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12, 0x60, 0x0a, 0x0d, 0x46, 0x69, 0x6e,
+	0x64, 0x4c, 0x69, 0x6b, 0x65, 0x64, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x29, 0x2e, 0x61, 0x70, 0x69,
+	0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x47, 0x65, 0x74, 0x4c,
+	0x6f, 0x6f, 0x6b, 0x41, 0x6e, 0x64, 0x4c, 0x69, 0x6b, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65,
+	0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x24, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x73, 0x74, 0x61, 0x74,
+	0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x2e, 0x4c, 0x6f, 0x6f, 0x6b, 0x41, 0x6e, 0x64, 0x4c, 0x69,
+	0x6b, 0x65, 0x4c, 0x69, 0x73, 0x74, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x42, 0x4f, 0x0a, 0x0e, 0x61,
+	0x70, 0x69, 0x2e, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x50, 0x01, 0x5a,
+	0x3b, 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, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63,
+	0x73, 0x3b, 0x73, 0x74, 0x61, 0x74, 0x69, 0x73, 0x74, 0x69, 0x63, 0x73, 0x62, 0x06, 0x70, 0x72,
+	0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
@@ -702,17 +714,21 @@ var file_statistics_proto_depIdxs = []int32{
 	6,  // 7: api.statistics.Statistics.ReduceLikeUnreadNum:input_type -> api.statistics.PersonMessage
 	6,  // 8: api.statistics.Statistics.UnlockLookRecord:input_type -> api.statistics.PersonMessage
 	2,  // 9: api.statistics.Statistics.FindLookList:input_type -> api.statistics.GetLookAndLikeListRequest
-	7,  // 10: api.statistics.Statistics.LookPerson:output_type -> google.protobuf.Empty
-	7,  // 11: api.statistics.Statistics.LikePerson:output_type -> google.protobuf.Empty
-	7,  // 12: api.statistics.Statistics.UnLikePerson:output_type -> google.protobuf.Empty
-	3,  // 13: api.statistics.Statistics.GetUserServiceStatisticsMessage:output_type -> api.statistics.UserStatisticsMessageReply
-	4,  // 14: api.statistics.Statistics.GetPartnerServiceStatisticsMessage:output_type -> api.statistics.PartnerStatisticsMessageReply
-	7,  // 15: api.statistics.Statistics.ReduceLookUnreadNum:output_type -> google.protobuf.Empty
-	7,  // 16: api.statistics.Statistics.ReduceLikeUnreadNum:output_type -> google.protobuf.Empty
-	7,  // 17: api.statistics.Statistics.UnlockLookRecord:output_type -> google.protobuf.Empty
-	0,  // 18: api.statistics.Statistics.FindLookList:output_type -> api.statistics.LookAndLikeListReply
-	10, // [10:19] is the sub-list for method output_type
-	1,  // [1:10] is the sub-list for method input_type
+	2,  // 10: api.statistics.Statistics.FindLikeList:input_type -> api.statistics.GetLookAndLikeListRequest
+	2,  // 11: api.statistics.Statistics.FindLikedList:input_type -> api.statistics.GetLookAndLikeListRequest
+	7,  // 12: api.statistics.Statistics.LookPerson:output_type -> google.protobuf.Empty
+	7,  // 13: api.statistics.Statistics.LikePerson:output_type -> google.protobuf.Empty
+	7,  // 14: api.statistics.Statistics.UnLikePerson:output_type -> google.protobuf.Empty
+	3,  // 15: api.statistics.Statistics.GetUserServiceStatisticsMessage:output_type -> api.statistics.UserStatisticsMessageReply
+	4,  // 16: api.statistics.Statistics.GetPartnerServiceStatisticsMessage:output_type -> api.statistics.PartnerStatisticsMessageReply
+	7,  // 17: api.statistics.Statistics.ReduceLookUnreadNum:output_type -> google.protobuf.Empty
+	7,  // 18: api.statistics.Statistics.ReduceLikeUnreadNum:output_type -> google.protobuf.Empty
+	7,  // 19: api.statistics.Statistics.UnlockLookRecord:output_type -> google.protobuf.Empty
+	0,  // 20: api.statistics.Statistics.FindLookList:output_type -> api.statistics.LookAndLikeListReply
+	0,  // 21: api.statistics.Statistics.FindLikeList:output_type -> api.statistics.LookAndLikeListReply
+	0,  // 22: api.statistics.Statistics.FindLikedList:output_type -> api.statistics.LookAndLikeListReply
+	12, // [12:23] is the sub-list for method output_type
+	1,  // [1:12] is the sub-list for method input_type
 	1,  // [1:1] is the sub-list for extension type_name
 	1,  // [1:1] is the sub-list for extension extendee
 	0,  // [0:1] is the sub-list for field type_name

+ 4 - 0
api/statistics/statistics.proto

@@ -29,6 +29,10 @@ service Statistics {
   rpc UnlockLookRecord (PersonMessage) returns (google.protobuf.Empty);
   // 查看看过我的列表
   rpc FindLookList (GetLookAndLikeListRequest) returns (LookAndLikeListReply);
+  // 查看我喜欢的列表
+  rpc FindLikeList (GetLookAndLikeListRequest) returns (LookAndLikeListReply);
+  // 查看喜欢我的列表
+  rpc FindLikedList (GetLookAndLikeListRequest) returns (LookAndLikeListReply);
 }
 
 message LookAndLikeListReply{

+ 76 - 0
api/statistics/statistics_grpc.pb.go

@@ -37,6 +37,10 @@ type StatisticsClient interface {
 	UnlockLookRecord(ctx context.Context, in *PersonMessage, opts ...grpc.CallOption) (*emptypb.Empty, error)
 	// 查看看过我的列表
 	FindLookList(ctx context.Context, in *GetLookAndLikeListRequest, opts ...grpc.CallOption) (*LookAndLikeListReply, error)
+	// 查看我喜欢的列表
+	FindLikeList(ctx context.Context, in *GetLookAndLikeListRequest, opts ...grpc.CallOption) (*LookAndLikeListReply, error)
+	// 查看喜欢我的列表
+	FindLikedList(ctx context.Context, in *GetLookAndLikeListRequest, opts ...grpc.CallOption) (*LookAndLikeListReply, error)
 }
 
 type statisticsClient struct {
@@ -128,6 +132,24 @@ func (c *statisticsClient) FindLookList(ctx context.Context, in *GetLookAndLikeL
 	return out, nil
 }
 
+func (c *statisticsClient) FindLikeList(ctx context.Context, in *GetLookAndLikeListRequest, opts ...grpc.CallOption) (*LookAndLikeListReply, error) {
+	out := new(LookAndLikeListReply)
+	err := c.cc.Invoke(ctx, "/api.statistics.Statistics/FindLikeList", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *statisticsClient) FindLikedList(ctx context.Context, in *GetLookAndLikeListRequest, opts ...grpc.CallOption) (*LookAndLikeListReply, error) {
+	out := new(LookAndLikeListReply)
+	err := c.cc.Invoke(ctx, "/api.statistics.Statistics/FindLikedList", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // StatisticsServer is the server API for Statistics service.
 // All implementations must embed UnimplementedStatisticsServer
 // for forward compatibility
@@ -150,6 +172,10 @@ type StatisticsServer interface {
 	UnlockLookRecord(context.Context, *PersonMessage) (*emptypb.Empty, error)
 	// 查看看过我的列表
 	FindLookList(context.Context, *GetLookAndLikeListRequest) (*LookAndLikeListReply, error)
+	// 查看我喜欢的列表
+	FindLikeList(context.Context, *GetLookAndLikeListRequest) (*LookAndLikeListReply, error)
+	// 查看喜欢我的列表
+	FindLikedList(context.Context, *GetLookAndLikeListRequest) (*LookAndLikeListReply, error)
 	mustEmbedUnimplementedStatisticsServer()
 }
 
@@ -184,6 +210,12 @@ func (UnimplementedStatisticsServer) UnlockLookRecord(context.Context, *PersonMe
 func (UnimplementedStatisticsServer) FindLookList(context.Context, *GetLookAndLikeListRequest) (*LookAndLikeListReply, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method FindLookList not implemented")
 }
+func (UnimplementedStatisticsServer) FindLikeList(context.Context, *GetLookAndLikeListRequest) (*LookAndLikeListReply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method FindLikeList not implemented")
+}
+func (UnimplementedStatisticsServer) FindLikedList(context.Context, *GetLookAndLikeListRequest) (*LookAndLikeListReply, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method FindLikedList not implemented")
+}
 func (UnimplementedStatisticsServer) mustEmbedUnimplementedStatisticsServer() {}
 
 // UnsafeStatisticsServer may be embedded to opt out of forward compatibility for this service.
@@ -359,6 +391,42 @@ func _Statistics_FindLookList_Handler(srv interface{}, ctx context.Context, dec
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Statistics_FindLikeList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(GetLookAndLikeListRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(StatisticsServer).FindLikeList(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.statistics.Statistics/FindLikeList",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(StatisticsServer).FindLikeList(ctx, req.(*GetLookAndLikeListRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Statistics_FindLikedList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(GetLookAndLikeListRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(StatisticsServer).FindLikedList(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.statistics.Statistics/FindLikedList",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(StatisticsServer).FindLikedList(ctx, req.(*GetLookAndLikeListRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // Statistics_ServiceDesc is the grpc.ServiceDesc for Statistics service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -402,6 +470,14 @@ var Statistics_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "FindLookList",
 			Handler:    _Statistics_FindLookList_Handler,
 		},
+		{
+			MethodName: "FindLikeList",
+			Handler:    _Statistics_FindLikeList_Handler,
+		},
+		{
+			MethodName: "FindLikedList",
+			Handler:    _Statistics_FindLikedList_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "statistics.proto",