wfz 3 anni fa
parent
commit
339f8d42a8
5 ha cambiato i file con 893 aggiunte e 798 eliminazioni
  1. 804 798
      api/user/user.pb.go
  2. 6 0
      api/user/user.proto
  3. 36 0
      api/user/user_grpc.pb.go
  4. 43 0
      api/user/user_http.pb.go
  5. 4 0
      js/api/user/user_http_pb.ts

File diff suppressed because it is too large
+ 804 - 798
api/user/user.pb.go


+ 6 - 0
api/user/user.proto

@@ -22,6 +22,12 @@ service User {
       body:"*"
     };
   };
+  rpc GetUserInfo1 (google.protobuf.Empty) returns (UserInfo){
+    option (google.api.http) = {
+      post: "/api/user/info1",
+      body:"*"
+    };
+  };
   // 2、用户发送验证码
   rpc SendPhoneCode (common.SendPhoneCodeRequest) returns (google.protobuf.Empty){
     option (google.api.http) = {

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

@@ -24,6 +24,7 @@ const _ = grpc.SupportPackageIsVersion7
 type UserClient interface {
 	// 1、获取用户详情
 	GetUserInfo(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UserInfo, error)
+	GetUserInfo1(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UserInfo, error)
 	// 2、用户发送验证码
 	SendPhoneCode(ctx context.Context, in *common.SendPhoneCodeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
 	// 3、用户验证验证码
@@ -284,6 +285,15 @@ func (c *userClient) GetUserInfo(ctx context.Context, in *emptypb.Empty, opts ..
 	return out, nil
 }
 
+func (c *userClient) GetUserInfo1(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*UserInfo, error) {
+	out := new(UserInfo)
+	err := c.cc.Invoke(ctx, "/api.user.User/GetUserInfo1", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 func (c *userClient) SendPhoneCode(ctx context.Context, in *common.SendPhoneCodeRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
 	out := new(emptypb.Empty)
 	err := c.cc.Invoke(ctx, "/api.user.User/SendPhoneCode", in, out, opts...)
@@ -1352,6 +1362,7 @@ func (c *userClient) CronRemoveExpirationVip(ctx context.Context, in *emptypb.Em
 type UserServer interface {
 	// 1、获取用户详情
 	GetUserInfo(context.Context, *emptypb.Empty) (*UserInfo, error)
+	GetUserInfo1(context.Context, *emptypb.Empty) (*UserInfo, error)
 	// 2、用户发送验证码
 	SendPhoneCode(context.Context, *common.SendPhoneCodeRequest) (*emptypb.Empty, error)
 	// 3、用户验证验证码
@@ -1603,6 +1614,9 @@ type UnimplementedUserServer struct {
 func (UnimplementedUserServer) GetUserInfo(context.Context, *emptypb.Empty) (*UserInfo, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method GetUserInfo not implemented")
 }
+func (UnimplementedUserServer) GetUserInfo1(context.Context, *emptypb.Empty) (*UserInfo, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method GetUserInfo1 not implemented")
+}
 func (UnimplementedUserServer) SendPhoneCode(context.Context, *common.SendPhoneCodeRequest) (*emptypb.Empty, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method SendPhoneCode not implemented")
 }
@@ -1988,6 +2002,24 @@ func _User_GetUserInfo_Handler(srv interface{}, ctx context.Context, dec func(in
 	return interceptor(ctx, in, info, handler)
 }
 
+func _User_GetUserInfo1_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(emptypb.Empty)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(UserServer).GetUserInfo1(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.user.User/GetUserInfo1",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserServer).GetUserInfo1(ctx, req.(*emptypb.Empty))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 func _User_SendPhoneCode_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(common.SendPhoneCodeRequest)
 	if err := dec(in); err != nil {
@@ -4123,6 +4155,10 @@ var User_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "GetUserInfo",
 			Handler:    _User_GetUserInfo_Handler,
 		},
+		{
+			MethodName: "GetUserInfo1",
+			Handler:    _User_GetUserInfo1_Handler,
+		},
 		{
 			MethodName: "SendPhoneCode",
 			Handler:    _User_SendPhoneCode_Handler,

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

@@ -67,6 +67,7 @@ type UserHTTPServer interface {
 	GetUserBalance(context.Context, *emptypb.Empty) (*UserBalance, error)
 	GetUserFreeNum(context.Context, *emptypb.Empty) (*UserFreeNum, error)
 	GetUserInfo(context.Context, *emptypb.Empty) (*UserInfo, error)
+	GetUserInfo1(context.Context, *emptypb.Empty) (*UserInfo, error)
 	GetUserIsLike(context.Context, *common.PersonParam) (*common.IsLike, error)
 	GetUserLookHandPickNum(context.Context, *emptypb.Empty) (*GetUserLookHandPickNumReply, error)
 	GetUserLookNum(context.Context, *emptypb.Empty) (*statistics.LookMessageReply, error)
@@ -130,6 +131,7 @@ type UserHTTPServer interface {
 func RegisterUserHTTPServer(s *http.Server, srv UserHTTPServer) {
 	r := s.Route("/")
 	r.POST("/api/user/info", _User_GetUserInfo0_HTTP_Handler(srv))
+	r.POST("/api/user/info1", _User_GetUserInfo10_HTTP_Handler(srv))
 	r.POST("/api/user/code/send", _User_SendPhoneCode0_HTTP_Handler(srv))
 	r.POST("/api/user/code/check", _User_CheckPhoneCode0_HTTP_Handler(srv))
 	r.POST("/api/user/update/information", _User_UpdateUserInformation0_HTTP_Handler(srv))
@@ -253,6 +255,33 @@ func _User_GetUserInfo0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Context)
 	}
 }
 
+func _User_GetUserInfo10_HTTP_Handler(srv UserHTTPServer) func(ctx http.Context) error {
+	return func(ctx http.Context) error {
+		var in emptypb.Empty
+		if err := ctx.Bind(&in); err != nil {
+			return err
+		}
+		if err := ctx.BindQuery(&in); err != nil {
+			return err
+		}
+		http.SetOperation(ctx, "/api.user.User/GetUserInfo1")
+		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
+			return srv.GetUserInfo1(ctx, req.(*emptypb.Empty))
+		})
+		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_SendPhoneCode0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Context) error {
 	return func(ctx http.Context) error {
 		var in common.SendPhoneCodeRequest
@@ -2829,6 +2858,7 @@ type UserHTTPClient interface {
 	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)
+	GetUserInfo1(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *UserInfo, err error)
 	GetUserIsLike(ctx context.Context, req *common.PersonParam, opts ...http.CallOption) (rsp *common.IsLike, err error)
 	GetUserLookHandPickNum(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *GetUserLookHandPickNumReply, err error)
 	GetUserLookNum(ctx context.Context, req *emptypb.Empty, opts ...http.CallOption) (rsp *statistics.LookMessageReply, err error)
@@ -3378,6 +3408,19 @@ func (c *UserHTTPClientImpl) GetUserInfo(ctx context.Context, in *emptypb.Empty,
 	return &out, err
 }
 
+func (c *UserHTTPClientImpl) GetUserInfo1(ctx context.Context, in *emptypb.Empty, opts ...http.CallOption) (*UserInfo, error) {
+	var out UserInfo
+	pattern := "/api/user/info1"
+	path := binding.EncodeURL(pattern, in, false)
+	opts = append(opts, http.Operation("/api.user.User/GetUserInfo1"))
+	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) GetUserIsLike(ctx context.Context, in *common.PersonParam, opts ...http.CallOption) (*common.IsLike, error) {
 	var out common.IsLike
 	pattern := "/api/user/islike"

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

@@ -11,6 +11,10 @@ const UserService = {
 	const res = await request.post<{ data: UserInfo, code: string, message: string }>('/api/user/info', req);
     return res.data.data;
   },
+  GetUserInfo1: async (req?: undefined) => {
+	const res = await request.post<{ data: UserInfo, code: string, message: string }>('/api/user/info1', req);
+    return res.data.data;
+  },
   /**  2、用户发送验证码 */
   SendPhoneCode: async (req?: SendPhoneCodeRequest) => {
 	const res = await request.post('/api/user/code/send', req);

Some files were not shown because too many files changed in this diff