wfz 3 년 전
부모
커밋
511a6b1ed8
10개의 변경된 파일853개의 추가작업 그리고 559개의 파일을 삭제
  1. 498 409
      api/chat/chat.pb.go
  2. 11 0
      api/chat/chat.proto
  3. 76 0
      api/chat/chat_grpc.pb.go
  4. 74 70
      api/user/user.pb.go
  5. 14 4
      api/user/user.proto
  6. 76 76
      api/user/user_grpc.pb.go
  7. 86 0
      api/user/user_http.pb.go
  8. 1 0
      errors/partner.go
  9. 7 0
      js/api/chat/chat_pb.ts
  10. 10 0
      js/api/user/user_http_pb.ts

파일 크기가 너무 크기때문에 변경 상태를 표시하지 않습니다.
+ 498 - 409
api/chat/chat.pb.go


+ 11 - 0
api/chat/chat.proto

@@ -69,6 +69,17 @@ service Chat {
   rpc PartnerDeleteCollect (PartnerCollectRequest) returns (google.protobuf.Empty){};
   // 查询接待员在本房间的收藏列表
   rpc FindChatCollectList (FindChatRecordListRequest) returns (common.ChatRecordListReply){};
+  // 用户解锁语音
+  rpc UserUnlockVoice (UserUnlockRequest) returns (google.protobuf.Empty){};
+  // 用户解锁图片
+  rpc UserUnlockPicture (UserUnlockRequest) returns (google.protobuf.Empty){};
+}
+
+message UserUnlockRequest{
+  int64 roomId = 1;// 房间ID
+  string personId = 2;
+  string personType = 3;
+  string identifyId = 4;
 }
 
 message PartnerCollectRequest{

+ 76 - 0
api/chat/chat_grpc.pb.go

@@ -77,6 +77,10 @@ type ChatClient interface {
 	PartnerDeleteCollect(ctx context.Context, in *PartnerCollectRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
 	// 查询接待员在本房间的收藏列表
 	FindChatCollectList(ctx context.Context, in *FindChatRecordListRequest, opts ...grpc.CallOption) (*common.ChatRecordListReply, error)
+	// 用户解锁语音
+	UserUnlockVoice(ctx context.Context, in *UserUnlockRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
+	// 用户解锁图片
+	UserUnlockPicture(ctx context.Context, in *UserUnlockRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
 }
 
 type chatClient struct {
@@ -348,6 +352,24 @@ func (c *chatClient) FindChatCollectList(ctx context.Context, in *FindChatRecord
 	return out, nil
 }
 
+func (c *chatClient) UserUnlockVoice(ctx context.Context, in *UserUnlockRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	out := new(emptypb.Empty)
+	err := c.cc.Invoke(ctx, "/api.chat.Chat/UserUnlockVoice", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *chatClient) UserUnlockPicture(ctx context.Context, in *UserUnlockRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	out := new(emptypb.Empty)
+	err := c.cc.Invoke(ctx, "/api.chat.Chat/UserUnlockPicture", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 // ChatServer is the server API for Chat service.
 // All implementations must embed UnimplementedChatServer
 // for forward compatibility
@@ -409,6 +431,10 @@ type ChatServer interface {
 	PartnerDeleteCollect(context.Context, *PartnerCollectRequest) (*emptypb.Empty, error)
 	// 查询接待员在本房间的收藏列表
 	FindChatCollectList(context.Context, *FindChatRecordListRequest) (*common.ChatRecordListReply, error)
+	// 用户解锁语音
+	UserUnlockVoice(context.Context, *UserUnlockRequest) (*emptypb.Empty, error)
+	// 用户解锁图片
+	UserUnlockPicture(context.Context, *UserUnlockRequest) (*emptypb.Empty, error)
 	mustEmbedUnimplementedChatServer()
 }
 
@@ -503,6 +529,12 @@ func (UnimplementedChatServer) PartnerDeleteCollect(context.Context, *PartnerCol
 func (UnimplementedChatServer) FindChatCollectList(context.Context, *FindChatRecordListRequest) (*common.ChatRecordListReply, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method FindChatCollectList not implemented")
 }
+func (UnimplementedChatServer) UserUnlockVoice(context.Context, *UserUnlockRequest) (*emptypb.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UserUnlockVoice not implemented")
+}
+func (UnimplementedChatServer) UserUnlockPicture(context.Context, *UserUnlockRequest) (*emptypb.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UserUnlockPicture not implemented")
+}
 func (UnimplementedChatServer) mustEmbedUnimplementedChatServer() {}
 
 // UnsafeChatServer may be embedded to opt out of forward compatibility for this service.
@@ -1038,6 +1070,42 @@ func _Chat_FindChatCollectList_Handler(srv interface{}, ctx context.Context, dec
 	return interceptor(ctx, in, info, handler)
 }
 
+func _Chat_UserUnlockVoice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UserUnlockRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(ChatServer).UserUnlockVoice(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.chat.Chat/UserUnlockVoice",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(ChatServer).UserUnlockVoice(ctx, req.(*UserUnlockRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _Chat_UserUnlockPicture_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(UserUnlockRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(ChatServer).UserUnlockPicture(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.chat.Chat/UserUnlockPicture",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(ChatServer).UserUnlockPicture(ctx, req.(*UserUnlockRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 // Chat_ServiceDesc is the grpc.ServiceDesc for Chat service.
 // It's only intended for direct use with grpc.RegisterService,
 // and not to be introspected or modified (even as a copy)
@@ -1161,6 +1229,14 @@ var Chat_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "FindChatCollectList",
 			Handler:    _Chat_FindChatCollectList_Handler,
 		},
+		{
+			MethodName: "UserUnlockVoice",
+			Handler:    _Chat_UserUnlockVoice_Handler,
+		},
+		{
+			MethodName: "UserUnlockPicture",
+			Handler:    _Chat_UserUnlockPicture_Handler,
+		},
 	},
 	Streams:  []grpc.StreamDesc{},
 	Metadata: "chat.proto",

+ 74 - 70
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, 0xba, 0x38, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x54,
+	0x65, 0x73, 0x75, 0x6c, 0x74, 0x32, 0xfa, 0x38, 0x0a, 0x04, 0x55, 0x73, 0x65, 0x72, 0x12, 0x54,
 	0x0a, 0x0b, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65, 0x72, 0x49, 0x6e, 0x66, 0x6f, 0x12, 0x16, 0x2e,
 	0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e,
 	0x45, 0x6d, 0x70, 0x74, 0x79, 0x1a, 0x12, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x75, 0x73, 0x65, 0x72,
@@ -2140,56 +2140,60 @@ var file_user_proto_rawDesc = []byte{
 	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, 0x12, 0x40, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x55,
-	0x73, 0x65, 0x72, 0x44, 0x42, 0x4d, 0x73, 0x67, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63,
-	0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x44, 0x50, 0x61,
-	0x72, 0x61, 0x6d, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
-	0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x12, 0x45, 0x0a, 0x0e, 0x46, 0x69,
-	0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x44, 0x42, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x2e, 0x61,
-	0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e,
-	0x49, 0x44, 0x4c, 0x69, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d,
-	0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x44, 0x42, 0x52, 0x65, 0x70, 0x6c,
-	0x79, 0x12, 0x57, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x61, 0x73, 0x74, 0x53,
-	0x63, 0x72, 0x69, 0x70, 0x49, 0x44, 0x44, 0x42, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63,
-	0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x61, 0x73, 0x74,
-	0x53, 0x63, 0x72, 0x69, 0x70, 0x49, 0x44, 0x44, 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74,
-	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, 0x00, 0x12, 0x58, 0x0a, 0x17, 0x46, 0x69,
-	0x6e, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x44,
-	0x42, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
-	0x6f, 0x6e, 0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64,
-	0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f,
-	0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x44, 0x42, 0x52, 0x65, 0x70,
-	0x6c, 0x79, 0x22, 0x00, 0x12, 0x4e, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73,
-	0x65, 0x72, 0x4c, 0x61, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12,
-	0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x72,
-	0x73, 0x6f, 0x6e, 0x49, 0x44, 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, 0x00, 0x12, 0x46, 0x0a, 0x13, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x52,
-	0x65, 0x64, 0x75, 0x63, 0x65, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 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, 0x12, 0x4c, 0x0a, 0x19,
-	0x4c, 0x6f, 0x6f, 0x6b, 0x42, 0x61, 0x63, 0x6b, 0x53, 0x63, 0x72, 0x69, 0x70, 0x52, 0x65, 0x64,
+	0x63, 0x68, 0x69, 0x6e, 0x67, 0x3a, 0x01, 0x2a, 0x12, 0x63, 0x0a, 0x0b, 0x55, 0x6e, 0x6c, 0x6f,
+	0x63, 0x6b, 0x56, 0x6f, 0x69, 0x63, 0x65, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f,
+	0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x6f, 0x6f, 0x6d, 0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65,
+	0x73, 0x74, 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, 0x21, 0x82, 0xd3, 0xe4, 0x93,
+	0x02, 0x1b, 0x22, 0x16, 0x2f, 0x61, 0x70, 0x69, 0x2f, 0x75, 0x73, 0x65, 0x72, 0x2f, 0x75, 0x6e,
+	0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x76, 0x6f, 0x69, 0x63, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x67, 0x0a,
+	0x0d, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x12, 0x19,
+	0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x52, 0x6f, 0x6f, 0x6d,
+	0x49, 0x44, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x23, 0x82, 0xd3, 0xe4, 0x93, 0x02, 0x1d, 0x22, 0x18, 0x2f, 0x61, 0x70, 0x69, 0x2f,
+	0x75, 0x73, 0x65, 0x72, 0x2f, 0x75, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x2f, 0x70, 0x69, 0x63, 0x74,
+	0x75, 0x72, 0x65, 0x3a, 0x01, 0x2a, 0x12, 0x40, 0x0a, 0x0c, 0x47, 0x65, 0x74, 0x55, 0x73, 0x65,
+	0x72, 0x44, 0x42, 0x4d, 0x73, 0x67, 0x12, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d,
+	0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x44, 0x50, 0x61, 0x72, 0x61,
+	0x6d, 0x1a, 0x15, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50,
+	0x65, 0x72, 0x73, 0x6f, 0x6e, 0x4d, 0x73, 0x67, 0x12, 0x45, 0x0a, 0x0e, 0x46, 0x69, 0x6e, 0x64,
+	0x55, 0x73, 0x65, 0x72, 0x44, 0x42, 0x4c, 0x69, 0x73, 0x74, 0x12, 0x18, 0x2e, 0x61, 0x70, 0x69,
+	0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x49, 0x44,
+	0x4c, 0x69, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f,
+	0x6e, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x44, 0x42, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x12,
+	0x57, 0x0a, 0x13, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x63, 0x72,
+	0x69, 0x70, 0x49, 0x44, 0x44, 0x42, 0x12, 0x26, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d,
+	0x6d, 0x6f, 0x6e, 0x2e, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x4c, 0x61, 0x73, 0x74, 0x53, 0x63,
+	0x72, 0x69, 0x70, 0x49, 0x44, 0x44, 0x42, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x00, 0x12, 0x58, 0x0a, 0x17, 0x46, 0x69, 0x6e, 0x64,
+	0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x55, 0x73, 0x65, 0x72, 0x44, 0x42, 0x4c,
+	0x69, 0x73, 0x74, 0x12, 0x20, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e,
+	0x2e, 0x46, 0x69, 0x6e, 0x64, 0x52, 0x65, 0x63, 0x6f, 0x6d, 0x6d, 0x65, 0x6e, 0x64, 0x52, 0x65,
+	0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x19, 0x2e, 0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d,
+	0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f, 0x6e, 0x44, 0x42, 0x52, 0x65, 0x70, 0x6c, 0x79,
+	0x22, 0x00, 0x12, 0x4e, 0x0a, 0x17, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x55, 0x73, 0x65, 0x72,
+	0x4c, 0x61, 0x73, 0x74, 0x4c, 0x6f, 0x67, 0x69, 0x6e, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x19, 0x2e,
+	0x61, 0x70, 0x69, 0x2e, 0x63, 0x6f, 0x6d, 0x6d, 0x6f, 0x6e, 0x2e, 0x50, 0x65, 0x72, 0x73, 0x6f,
+	0x6e, 0x49, 0x44, 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, 0x00, 0x12, 0x46, 0x0a, 0x13, 0x53, 0x65, 0x6e, 0x64, 0x4d, 0x73, 0x67, 0x52, 0x65, 0x64,
 	0x75, 0x63, 0x65, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 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, 0x12, 0x4a, 0x0a, 0x17, 0x43, 0x72,
-	0x65, 0x61, 0x74, 0x65, 0x53, 0x63, 0x72, 0x69, 0x70, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x43,
-	0x72, 0x65, 0x64, 0x69, 0x74, 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, 0x12, 0x49, 0x0a, 0x16, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x53,
-	0x63, 0x72, 0x69, 0x70, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74,
-	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, 0x12, 0x44, 0x0a, 0x11, 0x55, 0x6e, 0x6c, 0x6f, 0x63, 0x6b, 0x56, 0x6f, 0x69, 0x63, 0x65,
-	0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 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, 0x12, 0x46, 0x0a, 0x13, 0x55, 0x6e, 0x6c, 0x6f, 0x63,
-	0x6b, 0x50, 0x69, 0x63, 0x74, 0x75, 0x72, 0x65, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 0x12, 0x17,
+	0x6f, 0x62, 0x75, 0x66, 0x2e, 0x45, 0x6d, 0x70, 0x74, 0x79, 0x12, 0x4c, 0x0a, 0x19, 0x4c, 0x6f,
+	0x6f, 0x6b, 0x42, 0x61, 0x63, 0x6b, 0x53, 0x63, 0x72, 0x69, 0x70, 0x52, 0x65, 0x64, 0x75, 0x63,
+	0x65, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 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, 0x12, 0x4a, 0x0a, 0x17, 0x43, 0x72, 0x65, 0x61,
+	0x74, 0x65, 0x53, 0x63, 0x72, 0x69, 0x70, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x43, 0x72, 0x65,
+	0x64, 0x69, 0x74, 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, 0x12, 0x49, 0x0a, 0x16, 0x52, 0x65, 0x70, 0x6c, 0x79, 0x53, 0x63, 0x72,
+	0x69, 0x70, 0x52, 0x65, 0x64, 0x75, 0x63, 0x65, 0x43, 0x72, 0x65, 0x64, 0x69, 0x74, 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, 0x12,
@@ -2360,17 +2364,17 @@ var file_user_proto_depIdxs = []int32{
 	25, // 59: api.user.User.GetWindowInfo:input_type -> google.protobuf.Empty
 	25, // 60: api.user.User.GetUserFreeNum:input_type -> google.protobuf.Empty
 	33, // 61: api.user.User.GetRandomMatching:input_type -> api.common.SexReq
-	46, // 62: api.user.User.GetUserDBMsg:input_type -> api.common.PersonIDParam
-	47, // 63: api.user.User.FindUserDBList:input_type -> api.common.PersonIDList
-	48, // 64: api.user.User.UpdateLastScripIDDB:input_type -> api.common.UpdateLastScripIDDBRequest
-	49, // 65: api.user.User.FindRecommendUserDBList:input_type -> api.common.FindRecommendRequest
-	46, // 66: api.user.User.UpdateUserLastLoginTime:input_type -> api.common.PersonIDParam
-	30, // 67: api.user.User.SendMsgReduceCredit:input_type -> api.common.PersonParam
-	30, // 68: api.user.User.LookBackScripReduceCredit:input_type -> api.common.PersonParam
-	30, // 69: api.user.User.CreateScripReduceCredit:input_type -> api.common.PersonParam
-	30, // 70: api.user.User.ReplyScripReduceCredit:input_type -> api.common.PersonParam
-	30, // 71: api.user.User.UnlockVoiceCredit:input_type -> api.common.PersonParam
-	30, // 72: api.user.User.UnlockPictureCredit:input_type -> api.common.PersonParam
+	44, // 62: api.user.User.UnlockVoice:input_type -> api.common.RoomIDRequest
+	44, // 63: api.user.User.UnlockPicture:input_type -> api.common.RoomIDRequest
+	46, // 64: api.user.User.GetUserDBMsg:input_type -> api.common.PersonIDParam
+	47, // 65: api.user.User.FindUserDBList:input_type -> api.common.PersonIDList
+	48, // 66: api.user.User.UpdateLastScripIDDB:input_type -> api.common.UpdateLastScripIDDBRequest
+	49, // 67: api.user.User.FindRecommendUserDBList:input_type -> api.common.FindRecommendRequest
+	46, // 68: api.user.User.UpdateUserLastLoginTime:input_type -> api.common.PersonIDParam
+	30, // 69: api.user.User.SendMsgReduceCredit:input_type -> api.common.PersonParam
+	30, // 70: api.user.User.LookBackScripReduceCredit:input_type -> api.common.PersonParam
+	30, // 71: api.user.User.CreateScripReduceCredit:input_type -> api.common.PersonParam
+	30, // 72: api.user.User.ReplyScripReduceCredit:input_type -> api.common.PersonParam
 	30, // 73: api.user.User.MatchingCredit:input_type -> api.common.PersonParam
 	15, // 74: api.user.User.GetUserInfo:output_type -> api.user.UserInfo
 	25, // 75: api.user.User.SendPhoneCode:output_type -> google.protobuf.Empty
@@ -2429,17 +2433,17 @@ var file_user_proto_depIdxs = []int32{
 	74, // 128: api.user.User.GetWindowInfo:output_type -> api.chat.WindowInfo
 	0,  // 129: api.user.User.GetUserFreeNum:output_type -> api.user.UserFreeNum
 	75, // 130: api.user.User.GetRandomMatching:output_type -> api.chat.GetRandomMatchingReply
-	76, // 131: api.user.User.GetUserDBMsg:output_type -> api.common.PersonMsg
-	77, // 132: api.user.User.FindUserDBList:output_type -> api.common.PersonDBReply
-	25, // 133: api.user.User.UpdateLastScripIDDB:output_type -> google.protobuf.Empty
-	77, // 134: api.user.User.FindRecommendUserDBList:output_type -> api.common.PersonDBReply
-	25, // 135: api.user.User.UpdateUserLastLoginTime:output_type -> google.protobuf.Empty
-	25, // 136: api.user.User.SendMsgReduceCredit:output_type -> google.protobuf.Empty
-	25, // 137: api.user.User.LookBackScripReduceCredit:output_type -> google.protobuf.Empty
-	25, // 138: api.user.User.CreateScripReduceCredit:output_type -> google.protobuf.Empty
-	25, // 139: api.user.User.ReplyScripReduceCredit:output_type -> google.protobuf.Empty
-	25, // 140: api.user.User.UnlockVoiceCredit:output_type -> google.protobuf.Empty
-	25, // 141: api.user.User.UnlockPictureCredit:output_type -> google.protobuf.Empty
+	25, // 131: api.user.User.UnlockVoice:output_type -> google.protobuf.Empty
+	25, // 132: api.user.User.UnlockPicture:output_type -> google.protobuf.Empty
+	76, // 133: api.user.User.GetUserDBMsg:output_type -> api.common.PersonMsg
+	77, // 134: api.user.User.FindUserDBList:output_type -> api.common.PersonDBReply
+	25, // 135: api.user.User.UpdateLastScripIDDB:output_type -> google.protobuf.Empty
+	77, // 136: api.user.User.FindRecommendUserDBList:output_type -> api.common.PersonDBReply
+	25, // 137: api.user.User.UpdateUserLastLoginTime:output_type -> google.protobuf.Empty
+	25, // 138: api.user.User.SendMsgReduceCredit:output_type -> google.protobuf.Empty
+	25, // 139: api.user.User.LookBackScripReduceCredit:output_type -> google.protobuf.Empty
+	25, // 140: api.user.User.CreateScripReduceCredit:output_type -> google.protobuf.Empty
+	25, // 141: api.user.User.ReplyScripReduceCredit:output_type -> google.protobuf.Empty
 	25, // 142: api.user.User.MatchingCredit:output_type -> google.protobuf.Empty
 	74, // [74:143] is the sub-list for method output_type
 	5,  // [5:74] is the sub-list for method input_type

+ 14 - 4
api/user/user.proto

@@ -419,6 +419,20 @@ service User {
       body:"*"
     };
   };
+  // 解锁语音扣费
+  rpc UnlockVoice (common.RoomIDRequest) returns (google.protobuf.Empty){
+    option (google.api.http) = {
+      post: "/api/user/unlock/voice",
+      body:"*"
+    };
+  };
+  // 解锁图片扣费
+  rpc UnlockPicture (common.RoomIDRequest) returns (google.protobuf.Empty){
+    option (google.api.http) = {
+      post: "/api/user/unlock/picture",
+      body:"*"
+    };
+  };
 
   // ---rpc---
   // 1、获取用户详情
@@ -440,10 +454,6 @@ service User {
   rpc CreateScripReduceCredit (common.PersonParam) returns (google.protobuf.Empty);
   // 回纸条扣费
   rpc ReplyScripReduceCredit (common.PersonParam) returns (google.protobuf.Empty);
-  // 解锁语音扣费
-  rpc UnlockVoiceCredit (common.PersonParam) returns (google.protobuf.Empty);
-  // 解锁图片扣费
-  rpc UnlockPictureCredit (common.PersonParam) returns (google.protobuf.Empty);
   // 匹配扣费
   rpc MatchingCredit (common.PersonParam) returns (google.protobuf.Empty);
 }

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

@@ -138,6 +138,10 @@ type UserClient interface {
 	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)
+	// 解锁语音扣费
+	UnlockVoice(ctx context.Context, in *common.RoomIDRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
+	// 解锁图片扣费
+	UnlockPicture(ctx context.Context, in *common.RoomIDRequest, opts ...grpc.CallOption) (*emptypb.Empty, error)
 	// ---rpc---
 	// 1、获取用户详情
 	GetUserDBMsg(ctx context.Context, in *common.PersonIDParam, opts ...grpc.CallOption) (*common.PersonMsg, error)
@@ -157,10 +161,6 @@ type UserClient interface {
 	CreateScripReduceCredit(ctx context.Context, in *common.PersonParam, opts ...grpc.CallOption) (*emptypb.Empty, error)
 	// 回纸条扣费
 	ReplyScripReduceCredit(ctx context.Context, in *common.PersonParam, opts ...grpc.CallOption) (*emptypb.Empty, error)
-	// 解锁语音扣费
-	UnlockVoiceCredit(ctx context.Context, in *common.PersonParam, opts ...grpc.CallOption) (*emptypb.Empty, error)
-	// 解锁图片扣费
-	UnlockPictureCredit(ctx context.Context, in *common.PersonParam, opts ...grpc.CallOption) (*emptypb.Empty, error)
 	// 匹配扣费
 	MatchingCredit(ctx context.Context, in *common.PersonParam, opts ...grpc.CallOption) (*emptypb.Empty, error)
 }
@@ -686,6 +686,24 @@ func (c *userClient) GetRandomMatching(ctx context.Context, in *common.SexReq, o
 	return out, nil
 }
 
+func (c *userClient) UnlockVoice(ctx context.Context, in *common.RoomIDRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	out := new(emptypb.Empty)
+	err := c.cc.Invoke(ctx, "/api.user.User/UnlockVoice", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
+func (c *userClient) UnlockPicture(ctx context.Context, in *common.RoomIDRequest, opts ...grpc.CallOption) (*emptypb.Empty, error) {
+	out := new(emptypb.Empty)
+	err := c.cc.Invoke(ctx, "/api.user.User/UnlockPicture", in, out, opts...)
+	if err != nil {
+		return nil, err
+	}
+	return out, nil
+}
+
 func (c *userClient) GetUserDBMsg(ctx context.Context, in *common.PersonIDParam, opts ...grpc.CallOption) (*common.PersonMsg, error) {
 	out := new(common.PersonMsg)
 	err := c.cc.Invoke(ctx, "/api.user.User/GetUserDBMsg", in, out, opts...)
@@ -767,24 +785,6 @@ func (c *userClient) ReplyScripReduceCredit(ctx context.Context, in *common.Pers
 	return out, nil
 }
 
-func (c *userClient) UnlockVoiceCredit(ctx context.Context, in *common.PersonParam, opts ...grpc.CallOption) (*emptypb.Empty, error) {
-	out := new(emptypb.Empty)
-	err := c.cc.Invoke(ctx, "/api.user.User/UnlockVoiceCredit", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *userClient) UnlockPictureCredit(ctx context.Context, in *common.PersonParam, opts ...grpc.CallOption) (*emptypb.Empty, error) {
-	out := new(emptypb.Empty)
-	err := c.cc.Invoke(ctx, "/api.user.User/UnlockPictureCredit", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
 func (c *userClient) MatchingCredit(ctx context.Context, in *common.PersonParam, opts ...grpc.CallOption) (*emptypb.Empty, error) {
 	out := new(emptypb.Empty)
 	err := c.cc.Invoke(ctx, "/api.user.User/MatchingCredit", in, out, opts...)
@@ -914,6 +914,10 @@ type UserServer interface {
 	GetUserFreeNum(context.Context, *emptypb.Empty) (*UserFreeNum, error)
 	// 随机速配
 	GetRandomMatching(context.Context, *common.SexReq) (*chat.GetRandomMatchingReply, error)
+	// 解锁语音扣费
+	UnlockVoice(context.Context, *common.RoomIDRequest) (*emptypb.Empty, error)
+	// 解锁图片扣费
+	UnlockPicture(context.Context, *common.RoomIDRequest) (*emptypb.Empty, error)
 	// ---rpc---
 	// 1、获取用户详情
 	GetUserDBMsg(context.Context, *common.PersonIDParam) (*common.PersonMsg, error)
@@ -933,10 +937,6 @@ type UserServer interface {
 	CreateScripReduceCredit(context.Context, *common.PersonParam) (*emptypb.Empty, error)
 	// 回纸条扣费
 	ReplyScripReduceCredit(context.Context, *common.PersonParam) (*emptypb.Empty, error)
-	// 解锁语音扣费
-	UnlockVoiceCredit(context.Context, *common.PersonParam) (*emptypb.Empty, error)
-	// 解锁图片扣费
-	UnlockPictureCredit(context.Context, *common.PersonParam) (*emptypb.Empty, error)
 	// 匹配扣费
 	MatchingCredit(context.Context, *common.PersonParam) (*emptypb.Empty, error)
 	mustEmbedUnimplementedUserServer()
@@ -1117,6 +1117,12 @@ func (UnimplementedUserServer) GetUserFreeNum(context.Context, *emptypb.Empty) (
 func (UnimplementedUserServer) GetRandomMatching(context.Context, *common.SexReq) (*chat.GetRandomMatchingReply, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method GetRandomMatching not implemented")
 }
+func (UnimplementedUserServer) UnlockVoice(context.Context, *common.RoomIDRequest) (*emptypb.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UnlockVoice not implemented")
+}
+func (UnimplementedUserServer) UnlockPicture(context.Context, *common.RoomIDRequest) (*emptypb.Empty, error) {
+	return nil, status.Errorf(codes.Unimplemented, "method UnlockPicture not implemented")
+}
 func (UnimplementedUserServer) GetUserDBMsg(context.Context, *common.PersonIDParam) (*common.PersonMsg, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method GetUserDBMsg not implemented")
 }
@@ -1144,12 +1150,6 @@ func (UnimplementedUserServer) CreateScripReduceCredit(context.Context, *common.
 func (UnimplementedUserServer) ReplyScripReduceCredit(context.Context, *common.PersonParam) (*emptypb.Empty, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method ReplyScripReduceCredit not implemented")
 }
-func (UnimplementedUserServer) UnlockVoiceCredit(context.Context, *common.PersonParam) (*emptypb.Empty, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method UnlockVoiceCredit not implemented")
-}
-func (UnimplementedUserServer) UnlockPictureCredit(context.Context, *common.PersonParam) (*emptypb.Empty, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method UnlockPictureCredit not implemented")
-}
 func (UnimplementedUserServer) MatchingCredit(context.Context, *common.PersonParam) (*emptypb.Empty, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method MatchingCredit not implemented")
 }
@@ -2192,6 +2192,42 @@ func _User_GetRandomMatching_Handler(srv interface{}, ctx context.Context, dec f
 	return interceptor(ctx, in, info, handler)
 }
 
+func _User_UnlockVoice_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.RoomIDRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(UserServer).UnlockVoice(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.user.User/UnlockVoice",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserServer).UnlockVoice(ctx, req.(*common.RoomIDRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
+func _User_UnlockPicture_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
+	in := new(common.RoomIDRequest)
+	if err := dec(in); err != nil {
+		return nil, err
+	}
+	if interceptor == nil {
+		return srv.(UserServer).UnlockPicture(ctx, in)
+	}
+	info := &grpc.UnaryServerInfo{
+		Server:     srv,
+		FullMethod: "/api.user.User/UnlockPicture",
+	}
+	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
+		return srv.(UserServer).UnlockPicture(ctx, req.(*common.RoomIDRequest))
+	}
+	return interceptor(ctx, in, info, handler)
+}
+
 func _User_GetUserDBMsg_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(common.PersonIDParam)
 	if err := dec(in); err != nil {
@@ -2354,42 +2390,6 @@ func _User_ReplyScripReduceCredit_Handler(srv interface{}, ctx context.Context,
 	return interceptor(ctx, in, info, handler)
 }
 
-func _User_UnlockVoiceCredit_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).UnlockVoiceCredit(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/api.user.User/UnlockVoiceCredit",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(UserServer).UnlockVoiceCredit(ctx, req.(*common.PersonParam))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _User_UnlockPictureCredit_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).UnlockPictureCredit(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/api.user.User/UnlockPictureCredit",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(UserServer).UnlockPictureCredit(ctx, req.(*common.PersonParam))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
 func _User_MatchingCredit_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 {
@@ -2643,6 +2643,14 @@ var User_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "GetRandomMatching",
 			Handler:    _User_GetRandomMatching_Handler,
 		},
+		{
+			MethodName: "UnlockVoice",
+			Handler:    _User_UnlockVoice_Handler,
+		},
+		{
+			MethodName: "UnlockPicture",
+			Handler:    _User_UnlockPicture_Handler,
+		},
 		{
 			MethodName: "GetUserDBMsg",
 			Handler:    _User_GetUserDBMsg_Handler,
@@ -2679,14 +2687,6 @@ var User_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "ReplyScripReduceCredit",
 			Handler:    _User_ReplyScripReduceCredit_Handler,
 		},
-		{
-			MethodName: "UnlockVoiceCredit",
-			Handler:    _User_UnlockVoiceCredit_Handler,
-		},
-		{
-			MethodName: "UnlockPictureCredit",
-			Handler:    _User_UnlockPictureCredit_Handler,
-		},
 		{
 			MethodName: "MatchingCredit",
 			Handler:    _User_MatchingCredit_Handler,

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

@@ -73,6 +73,8 @@ type UserHTTPServer interface {
 	Report(context.Context, *common.ReportChatRequest) (*emptypb.Empty, error)
 	SendPhoneCode(context.Context, *common.SendPhoneCodeRequest) (*emptypb.Empty, error)
 	UnlockLookRecord(context.Context, *common.PersonParam) (*emptypb.Empty, error)
+	UnlockPicture(context.Context, *common.RoomIDRequest) (*emptypb.Empty, error)
+	UnlockVoice(context.Context, *common.RoomIDRequest) (*emptypb.Empty, error)
 	UpdateLastScripID(context.Context, *common.UpdateLastScripIDRequest) (*emptypb.Empty, error)
 	UpdateUserInformation(context.Context, *common.UpdateInformationRequest) (*emptypb.Empty, error)
 	UserDeleteChat(context.Context, *common.RoomIDRequest) (*emptypb.Empty, error)
@@ -148,6 +150,8 @@ func RegisterUserHTTPServer(s *http.Server, srv UserHTTPServer) {
 	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))
+	r.POST("/api/user/unlock/voice", _User_UnlockVoice0_HTTP_Handler(srv))
+	r.POST("/api/user/unlock/picture", _User_UnlockPicture0_HTTP_Handler(srv))
 }
 
 func _User_GetUserInfo0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Context) error {
@@ -1689,6 +1693,60 @@ func _User_GetRandomMatching0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Con
 	}
 }
 
+func _User_UnlockVoice0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Context) error {
+	return func(ctx http.Context) error {
+		var in common.RoomIDRequest
+		if err := ctx.Bind(&in); err != nil {
+			return err
+		}
+		if err := ctx.BindQuery(&in); err != nil {
+			return err
+		}
+		http.SetOperation(ctx, "/api.user.User/UnlockVoice")
+		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
+			return srv.UnlockVoice(ctx, req.(*common.RoomIDRequest))
+		})
+		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_UnlockPicture0_HTTP_Handler(srv UserHTTPServer) func(ctx http.Context) error {
+	return func(ctx http.Context) error {
+		var in common.RoomIDRequest
+		if err := ctx.Bind(&in); err != nil {
+			return err
+		}
+		if err := ctx.BindQuery(&in); err != nil {
+			return err
+		}
+		http.SetOperation(ctx, "/api.user.User/UnlockPicture")
+		h := ctx.Middleware(func(ctx context.Context, req interface{}) (interface{}, error) {
+			return srv.UnlockPicture(ctx, req.(*common.RoomIDRequest))
+		})
+		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)
@@ -1733,6 +1791,8 @@ type UserHTTPClient interface {
 	Report(ctx context.Context, req *common.ReportChatRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
 	SendPhoneCode(ctx context.Context, req *common.SendPhoneCodeRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
 	UnlockLookRecord(ctx context.Context, req *common.PersonParam, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
+	UnlockPicture(ctx context.Context, req *common.RoomIDRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
+	UnlockVoice(ctx context.Context, req *common.RoomIDRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
 	UpdateLastScripID(ctx context.Context, req *common.UpdateLastScripIDRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
 	UpdateUserInformation(ctx context.Context, req *common.UpdateInformationRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
 	UserDeleteChat(ctx context.Context, req *common.RoomIDRequest, opts ...http.CallOption) (rsp *emptypb.Empty, err error)
@@ -2316,6 +2376,32 @@ func (c *UserHTTPClientImpl) UnlockLookRecord(ctx context.Context, in *common.Pe
 	return &out, err
 }
 
+func (c *UserHTTPClientImpl) UnlockPicture(ctx context.Context, in *common.RoomIDRequest, opts ...http.CallOption) (*emptypb.Empty, error) {
+	var out emptypb.Empty
+	pattern := "/api/user/unlock/picture"
+	path := binding.EncodeURL(pattern, in, false)
+	opts = append(opts, http.Operation("/api.user.User/UnlockPicture"))
+	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) UnlockVoice(ctx context.Context, in *common.RoomIDRequest, opts ...http.CallOption) (*emptypb.Empty, error) {
+	var out emptypb.Empty
+	pattern := "/api/user/unlock/voice"
+	path := binding.EncodeURL(pattern, in, false)
+	opts = append(opts, http.Operation("/api.user.User/UnlockVoice"))
+	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) UpdateLastScripID(ctx context.Context, in *common.UpdateLastScripIDRequest, opts ...http.CallOption) (*emptypb.Empty, error) {
 	var out emptypb.Empty
 	pattern := "/api/user/scrip/last/update"

+ 1 - 0
errors/partner.go

@@ -6,4 +6,5 @@ var (
 	ErrorPartnerNotExist   = codes.Error(20001, "陪伴者不存在")
 	ErrorWithdrawNotFind   = codes.Error(20002, "提现套餐不存在")
 	ErrorWithdrawNotEnough = codes.Error(20003, "所需提现积分不足")
+	ErrorUserNotUnlock     = codes.Error(20004, "用户未解锁改功能")
 )

+ 7 - 0
js/api/chat/chat_pb.ts

@@ -1,3 +1,10 @@
+export interface UserUnlockRequest{
+    /**  房间ID */
+    roomId?:number;
+    personId?:string;
+    personType?:string;
+    identifyId?:string;
+}
 export interface PartnerCollectRequest{
     /**  记录ID */
     chatRecordId?:number;

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

@@ -293,6 +293,16 @@ const UserService = {
 	const res = await request.post<{ data: GetRandomMatchingReply, code: string, message: string }>('/api/user/random/matching', req);
     return res.data.data;
   },
+  /**  解锁语音扣费 */
+  UnlockVoice: async (req?: RoomIDRequest) => {
+	const res = await request.post('/api/user/unlock/voice', req);
+    return res.data.data;
+  },
+  /**  解锁图片扣费 */
+  UnlockPicture: async (req?: RoomIDRequest) => {
+	const res = await request.post('/api/user/unlock/picture', req);
+    return res.data.data;
+  },
 
 };
 

이 변경점에서 너무 많은 파일들이 변경되어 몇몇 파일들은 표시되지 않았습니다.