wfz 3 vuotta sitten
vanhempi
commit
11cb8b0ecc
5 muutettua tiedostoa jossa 239 lisäystä ja 37 poistoa
  1. 53 37
      api/user/user.pb.go
  2. 14 0
      api/user/user.proto
  3. 76 0
      api/user/user_grpc.pb.go
  4. 86 0
      api/user/user_http.pb.go
  5. 10 0
      js/api/user/user_http_pb.ts

+ 53 - 37
api/user/user.pb.go

@@ -715,8 +715,8 @@ var file_user_proto_rawDesc = []byte{
 	0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x69, 0x74, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x61, 0x72,
 	0x65, 0x61, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x61, 0x72, 0x65, 0x61, 0x22, 0x1e,
 	0x0a, 0x0a, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x10, 0x0a, 0x03,
-	0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x32, 0x96,
-	0x18, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x7e, 0x0a, 0x15, 0x55, 0x70, 0x64, 0x61, 0x74,
+	0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x32, 0xca,
+	0x19, 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, 0x6d, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x52,
@@ -909,11 +909,23 @@ var file_user_proto_rawDesc = []byte{
 	0x16, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72, 0x2e, 0x43, 0x68, 0x61, 0x74, 0x43,
 	0x61, 0x72, 0x64, 0x49, 0x6e, 0x66, 0x6f, 0x22, 0x1e, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x18, 0x22,
 	0x13, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x63, 0x68, 0x61, 0x74, 0x2f,
-	0x63, 0x61, 0x72, 0x64, 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,
+	0x63, 0x61, 0x72, 0x64, 0x3a, 0x01, 0x2a, 0x12, 0x56, 0x0a, 0x08, 0x55, 0x73, 0x65, 0x72, 0x4c,
+	0x69, 0x6b, 0x65, 0x12, 0x17, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
+	0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x1a, 0x16, 0x2e, 0x67,
+	0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45,
+	0x6d, 0x70, 0x74, 0x79, 0x22, 0x19, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x13, 0x22, 0x0e, 0x2f, 0x61,
+	0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x6c, 0x69, 0x6b, 0x65, 0x3a, 0x01, 0x2a, 0x12,
+	0x5a, 0x0a, 0x0a, 0x55, 0x73, 0x65, 0x72, 0x55, 0x6e, 0x4c, 0x69, 0x6b, 0x65, 0x12, 0x17, 0x2e,
+	0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f,
+	0x6e, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x1a, 0x16, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e,
+	0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x22, 0x1b,
+	0x82, 0xd3, 0xe4, 0x93, 0x02, 0x15, 0x22, 0x10, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65,
+	0x72, 0x2f, 0x75, 0x6e, 0x6c, 0x69, 0x6b, 0x65, 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 (
@@ -997,36 +1009,40 @@ var file_user_proto_depIdxs = []int32{
 	8,  // 26: api.user.User.UserInformationStatus:input_type -> google.protobuf.Empty
 	8,  // 27: api.user.User.UserGetInformationAward:input_type -> google.protobuf.Empty
 	13, // 28: api.user.User.UserGetChatCard:input_type -> api.common.PersonParam
-	8,  // 29: api.user.User.UpdateUserInformation:output_type -> google.protobuf.Empty
-	5,  // 30: api.user.User.GetUserInfo:output_type -> api.user.UserInfo
-	21, // 31: api.user.User.GetUserDBMsg:output_type -> api.common.PersonMsg
-	8,  // 32: api.user.User.SendPhoneCode:output_type -> google.protobuf.Empty
-	8,  // 33: api.user.User.CheckPhoneCode:output_type -> google.protobuf.Empty
-	22, // 34: api.user.User.CheckUserPartnerIsRelationship:output_type -> api.chat.CheckUserPartnerIsRelationshipReply
-	23, // 35: api.user.User.CreateUserPersonRoom:output_type -> api.chat.RoomReply
-	24, // 36: api.user.User.GetPartnerCircleInfo:output_type -> api.common.AddFriendMessageInfo
-	25, // 37: api.user.User.UserGetHomeInfo:output_type -> api.common.HomeInfo
-	26, // 38: api.user.User.FindUserDBList:output_type -> api.common.PersonDBReply
-	27, // 39: api.user.User.FindLookList:output_type -> api.statistics.LookAndLikeListReply
-	27, // 40: api.user.User.FindLikeList:output_type -> api.statistics.LookAndLikeListReply
-	27, // 41: api.user.User.FindLikedList:output_type -> api.statistics.LookAndLikeListReply
-	28, // 42: api.user.User.GetLookAndLikeStatisticsMessage:output_type -> api.statistics.LookAndLikeMessageReply
-	29, // 43: api.user.User.WxConf:output_type -> api.common.WxConfResponse
-	30, // 44: api.user.User.FindTagListBySex:output_type -> api.common.TagListReply
-	31, // 45: api.user.User.FindOnlineList:output_type -> api.common.OnlinePersonListReply
-	3,  // 46: api.user.User.FindWithinSevenDayRoomList:output_type -> api.user.UserFindChatListReply
-	3,  // 47: api.user.User.FindOverSevenDayRoomList:output_type -> api.user.UserFindChatListReply
-	32, // 48: api.user.User.UserGetPersonLikedAndLooked:output_type -> api.common.LookedAndLikedNum
-	2,  // 49: api.user.User.GetUserBalance:output_type -> api.user.UserBalance
-	33, // 50: api.user.User.GetUserLookNum:output_type -> api.statistics.LookMessageReply
-	34, // 51: api.user.User.FindChatRecordList:output_type -> api.common.ChatRecordListReply
-	35, // 52: api.user.User.FindChatRoomMsg:output_type -> api.common.ChatRoomMsg
-	8,  // 53: api.user.User.UserFinishInformation:output_type -> google.protobuf.Empty
-	1,  // 54: api.user.User.UserInformationStatus:output_type -> api.user.InformationStatus
-	8,  // 55: api.user.User.UserGetInformationAward:output_type -> google.protobuf.Empty
-	0,  // 56: api.user.User.UserGetChatCard:output_type -> api.user.ChatCardInfo
-	29, // [29:57] is the sub-list for method output_type
-	1,  // [1:29] is the sub-list for method input_type
+	13, // 29: api.user.User.UserLike:input_type -> api.common.PersonParam
+	13, // 30: api.user.User.UserUnLike:input_type -> api.common.PersonParam
+	8,  // 31: api.user.User.UpdateUserInformation:output_type -> google.protobuf.Empty
+	5,  // 32: api.user.User.GetUserInfo:output_type -> api.user.UserInfo
+	21, // 33: api.user.User.GetUserDBMsg:output_type -> api.common.PersonMsg
+	8,  // 34: api.user.User.SendPhoneCode:output_type -> google.protobuf.Empty
+	8,  // 35: api.user.User.CheckPhoneCode:output_type -> google.protobuf.Empty
+	22, // 36: api.user.User.CheckUserPartnerIsRelationship:output_type -> api.chat.CheckUserPartnerIsRelationshipReply
+	23, // 37: api.user.User.CreateUserPersonRoom:output_type -> api.chat.RoomReply
+	24, // 38: api.user.User.GetPartnerCircleInfo:output_type -> api.common.AddFriendMessageInfo
+	25, // 39: api.user.User.UserGetHomeInfo:output_type -> api.common.HomeInfo
+	26, // 40: api.user.User.FindUserDBList:output_type -> api.common.PersonDBReply
+	27, // 41: api.user.User.FindLookList:output_type -> api.statistics.LookAndLikeListReply
+	27, // 42: api.user.User.FindLikeList:output_type -> api.statistics.LookAndLikeListReply
+	27, // 43: api.user.User.FindLikedList:output_type -> api.statistics.LookAndLikeListReply
+	28, // 44: api.user.User.GetLookAndLikeStatisticsMessage:output_type -> api.statistics.LookAndLikeMessageReply
+	29, // 45: api.user.User.WxConf:output_type -> api.common.WxConfResponse
+	30, // 46: api.user.User.FindTagListBySex:output_type -> api.common.TagListReply
+	31, // 47: api.user.User.FindOnlineList:output_type -> api.common.OnlinePersonListReply
+	3,  // 48: api.user.User.FindWithinSevenDayRoomList:output_type -> api.user.UserFindChatListReply
+	3,  // 49: api.user.User.FindOverSevenDayRoomList:output_type -> api.user.UserFindChatListReply
+	32, // 50: api.user.User.UserGetPersonLikedAndLooked:output_type -> api.common.LookedAndLikedNum
+	2,  // 51: api.user.User.GetUserBalance:output_type -> api.user.UserBalance
+	33, // 52: api.user.User.GetUserLookNum:output_type -> api.statistics.LookMessageReply
+	34, // 53: api.user.User.FindChatRecordList:output_type -> api.common.ChatRecordListReply
+	35, // 54: api.user.User.FindChatRoomMsg:output_type -> api.common.ChatRoomMsg
+	8,  // 55: api.user.User.UserFinishInformation:output_type -> google.protobuf.Empty
+	1,  // 56: api.user.User.UserInformationStatus:output_type -> api.user.InformationStatus
+	8,  // 57: api.user.User.UserGetInformationAward:output_type -> google.protobuf.Empty
+	0,  // 58: api.user.User.UserGetChatCard:output_type -> api.user.ChatCardInfo
+	8,  // 59: api.user.User.UserLike:output_type -> google.protobuf.Empty
+	8,  // 60: api.user.User.UserUnLike:output_type -> google.protobuf.Empty
+	31, // [31:61] is the sub-list for method output_type
+	1,  // [1:31] 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

+ 14 - 0
api/user/user.proto

@@ -200,6 +200,20 @@ service User {
       body:"*"
     };
   };
+  // 用户关注某人
+  rpc UserLike(common.PersonParam) returns (google.protobuf.Empty){
+    option (google.api.http) = {
+      post: "/api/user/like",
+      body:"*"
+    };
+  };
+  // 用户取关某人
+  rpc UserUnLike(common.PersonParam) returns (google.protobuf.Empty){
+    option (google.api.http) = {
+      post: "/api/user/unlike",
+      body:"*"
+    };
+  };
 }
 
 message ChatCardInfo{

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

@@ -78,6 +78,10 @@ type UserClient interface {
 	UserGetInformationAward(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*emptypb.Empty, error)
 	// 用户获取聊天对象的资料卡片
 	UserGetChatCard(ctx context.Context, in *common.PersonParam, opts ...grpc.CallOption) (*ChatCardInfo, error)
+	// 用户关注某人
+	UserLike(ctx context.Context, in *common.PersonParam, opts ...grpc.CallOption) (*emptypb.Empty, error)
+	// 用户取关某人
+	UserUnLike(ctx context.Context, in *common.PersonParam, opts ...grpc.CallOption) (*emptypb.Empty, error)
 }
 
 type userClient struct {
@@ -340,6 +344,24 @@ func (c *userClient) UserGetChatCard(ctx context.Context, in *common.PersonParam
 	return out, nil
 }
 
+func (c *userClient) UserLike(ctx context.Context, in *common.PersonParam, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	out := new(emptypb.Empty)
+	err := c.cc.Invoke(ctx, "/api.user.User/UserLike", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *userClient) UserUnLike(ctx context.Context, in *common.PersonParam, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	out := new(emptypb.Empty)
+	err := c.cc.Invoke(ctx, "/api.user.User/UserUnLike", 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
@@ -400,6 +422,10 @@ type UserServer interface {
 	UserGetInformationAward(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
 	// 用户获取聊天对象的资料卡片
 	UserGetChatCard(context.Context, *common.PersonParam) (*ChatCardInfo, error)
+	// 用户关注某人
+	UserLike(context.Context, *common.PersonParam) (*emptypb.Empty, error)
+	// 用户取关某人
+	UserUnLike(context.Context, *common.PersonParam) (*emptypb.Empty, error)
 	mustEmbedUnimplementedUserServer()
 }
 
@@ -491,6 +517,12 @@ func (UnimplementedUserServer) UserGetInformationAward(context.Context, *emptypb
 func (UnimplementedUserServer) UserGetChatCard(context.Context, *common.PersonParam) (*ChatCardInfo, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method UserGetChatCard not implemented")
 }
+func (UnimplementedUserServer) UserLike(context.Context, *common.PersonParam) (*emptypb.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UserLike not implemented")
+}
+func (UnimplementedUserServer) UserUnLike(context.Context, *common.PersonParam) (*emptypb.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UserUnLike not implemented")
+}
 func (UnimplementedUserServer) mustEmbedUnimplementedUserServer() {}
 
 // UnsafeUserServer may be embedded to opt out of forward compatibility for this service.
@@ -1008,6 +1040,42 @@ func _User_UserGetChatCard_Handler(srv interface{}, ctx context.Context, dec fun
 	return interceptor(ctx, in, info, handler)
 }
 
+func _User_UserLike_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.PersonParam)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(UserServer).UserLike(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.user.User/UserLike",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserServer).UserLike(ctx, req.(*common.PersonParam))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _User_UserUnLike_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.PersonParam)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(UserServer).UserUnLike(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.user.User/UserUnLike",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserServer).UserUnLike(ctx, req.(*common.PersonParam))
+	}
+	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)
@@ -1127,6 +1195,14 @@ var User_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "UserGetChatCard",
 			Handler:    _User_UserGetChatCard_Handler,
 		},
+		{
+			MethodName: "UserLike",
+			Handler:    _User_UserLike_Handler,
+		},
+		{
+			MethodName: "UserUnLike",
+			Handler:    _User_UserUnLike_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "user.proto",

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

@@ -55,6 +55,8 @@ type UserHTTPServer interface {
 	UserGetInformationAward(context.Context, *emptypb.Empty) (*emptypb.Empty, error)
 	UserGetPersonLikedAndLooked(context.Context, *common.PersonParam) (*common.LookedAndLikedNum, error)
 	UserInformationStatus(context.Context, *emptypb.Empty) (*InformationStatus, error)
+	UserLike(context.Context, *common.PersonParam) (*emptypb.Empty, error)
+	UserUnLike(context.Context, *common.PersonParam) (*emptypb.Empty, error)
 	WxConf(context.Context, *common.WxConfReq) (*common.WxConfResponse, error)
 }
 
@@ -86,6 +88,8 @@ func RegisterUserHTTPServer(s *http.Server, srv UserHTTPServer) {
 	r.POST("/api/user/information/status", _User_UserInformationStatus0_HTTP_Handler(srv))
 	r.POST("/api/user/information/award", _User_UserGetInformationAward0_HTTP_Handler(srv))
 	r.POST("/api/user/chat/card", _User_UserGetChatCard0_HTTP_Handler(srv))
+	r.POST("/api/user/like", _User_UserLike0_HTTP_Handler(srv))
+	r.POST("/api/user/unlike", _User_UserUnLike0_HTTP_Handler(srv))
 }
 
 func _User_UpdateUserInformation0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Context) error {
@@ -790,6 +794,60 @@ func _User_UserGetChatCard0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Conte
 	}
 }
 
+func _User_UserLike0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Context) error {
+	return func(ctx http.Context) error {
+		var in common.PersonParam
+		if err := ctx.Bind(&in); err != nil {
+			return err
+		}
+		if err := ctx.BindQuery(&in); err != nil {
+			return err
+		}
+		http.SetOperation(ctx, "/api.user.User/UserLike")
+		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
+			return srv.UserLike(ctx, req.(*common.PersonParam))
+		})
+		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)
+	}
+}
+
+func _User_UserUnLike0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Context) error {
+	return func(ctx http.Context) error {
+		var in common.PersonParam
+		if err := ctx.Bind(&in); err != nil {
+			return err
+		}
+		if err := ctx.BindQuery(&in); err != nil {
+			return err
+		}
+		http.SetOperation(ctx, "/api.user.User/UserUnLike")
+		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
+			return srv.UserUnLike(ctx, req.(*common.PersonParam))
+		})
+		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)
@@ -816,6 +874,8 @@ type UserHTTPClient interface {
 	UserGetInformationAward(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
 	UserGetPersonLikedAndLooked(ctx context.Context, req *common.PersonParam, opts ...http.CallOption) (rsp *common.LookedAndLikedNum, err error)
 	UserInformationStatus(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *InformationStatus, err error)
+	UserLike(ctx context.Context, req *common.PersonParam, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
+	UserUnLike(ctx context.Context, req *common.PersonParam, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
 	WxConf(ctx context.Context, req *common.WxConfReq, opts ...http.CallOption) (rsp *common.WxConfResponse, err error)
 }
 
@@ -1152,6 +1212,32 @@ func (c *UserHTTPClientImpl) UserInformationStatus(ctx context.Context, in *empt
 	return &out, err
 }
 
+func (c *UserHTTPClientImpl) UserLike(ctx context.Context, in *common.PersonParam, opts ...http.CallOption) (*emptypb.Empty, error) {
+	var out emptypb.Empty
+	pattern := "/api/user/like"
+	path := binding.EncodeURL(pattern, in, false)
+	opts = append(opts, http.Operation("/api.user.User/UserLike"))
+	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) UserUnLike(ctx context.Context, in *common.PersonParam, opts ...http.CallOption) (*emptypb.Empty, error) {
+	var out emptypb.Empty
+	pattern := "/api/user/unlike"
+	path := binding.EncodeURL(pattern, in, false)
+	opts = append(opts, http.Operation("/api.user.User/UserUnLike"))
+	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) WxConf(ctx context.Context, in *common.WxConfReq, opts ...http.CallOption) (*common.WxConfResponse, error) {
 	var out common.WxConfResponse
 	pattern := "/api/wx/jssdk/config"

+ 10 - 0
js/api/user/user_http_pb.ts

@@ -136,6 +136,16 @@ const UserService = {
 	const res = await request.post<{ data: ChatCardInfo, code: string, message: string }>('/api/user/chat/card', req);
     return res.data.data;
   },
+  /**  用户关注某人 */
+  UserLike: async (req?: PersonParam) => {
+	const res = await request.post('/api/user/like', req);
+    return res.data.data;
+  },
+  /**  用户取关某人 */
+  UserUnLike: async (req?: PersonParam) => {
+	const res = await request.post('/api/user/unlike', req);
+    return res.data.data;
+  },
 
 };