|
@@ -85,6 +85,10 @@ type ChatClient interface {
|
|
|
GetRoomProfit(ctx context.Context, in *common.RoomIDRequest, opts ...grpc.CallOption) (*GetRoomProfitReply, error)
|
|
GetRoomProfit(ctx context.Context, in *common.RoomIDRequest, opts ...grpc.CallOption) (*GetRoomProfitReply, error)
|
|
|
// 获取在线人数
|
|
// 获取在线人数
|
|
|
GetOnlinePersonNum(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetOnlinePersonNumReply, error)
|
|
GetOnlinePersonNum(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*GetOnlinePersonNumReply, error)
|
|
|
|
|
+ // 查询用户全部的未读数
|
|
|
|
|
+ FindUserAllUnreadNum(ctx context.Context, in *common.IdentifyIdRequest, opts ...grpc.CallOption) (*UnreadNumReply, error)
|
|
|
|
|
+ // 查询接待员全部的未读数
|
|
|
|
|
+ FindPartnerAllUnreadNum(ctx context.Context, in *common.IdentifyIdRequest, opts ...grpc.CallOption) (*UnreadNumReply, error)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
type chatClient struct {
|
|
type chatClient struct {
|
|
@@ -392,6 +396,24 @@ func (c *chatClient) GetOnlinePersonNum(ctx context.Context, in *emptypb.Empty,
|
|
|
return out, nil
|
|
return out, nil
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+func (c *chatClient) FindUserAllUnreadNum(ctx context.Context, in *common.IdentifyIdRequest, opts ...grpc.CallOption) (*UnreadNumReply, error) {
|
|
|
|
|
+ out := new(UnreadNumReply)
|
|
|
|
|
+ err := c.cc.Invoke(ctx, "/api.chat.Chat/FindUserAllUnreadNum", in, out, opts...)
|
|
|
|
|
+ if err != nil {
|
|
|
|
|
+ return nil, err
|
|
|
|
|
+ }
|
|
|
|
|
+ return out, nil
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+func (c *chatClient) FindPartnerAllUnreadNum(ctx context.Context, in *common.IdentifyIdRequest, opts ...grpc.CallOption) (*UnreadNumReply, error) {
|
|
|
|
|
+ out := new(UnreadNumReply)
|
|
|
|
|
+ err := c.cc.Invoke(ctx, "/api.chat.Chat/FindPartnerAllUnreadNum", in, out, opts...)
|
|
|
|
|
+ if err != nil {
|
|
|
|
|
+ return nil, err
|
|
|
|
|
+ }
|
|
|
|
|
+ return out, nil
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// ChatServer is the server API for Chat service.
|
|
// ChatServer is the server API for Chat service.
|
|
|
// All implementations must embed UnimplementedChatServer
|
|
// All implementations must embed UnimplementedChatServer
|
|
|
// for forward compatibility
|
|
// for forward compatibility
|
|
@@ -461,6 +483,10 @@ type ChatServer interface {
|
|
|
GetRoomProfit(context.Context, *common.RoomIDRequest) (*GetRoomProfitReply, error)
|
|
GetRoomProfit(context.Context, *common.RoomIDRequest) (*GetRoomProfitReply, error)
|
|
|
// 获取在线人数
|
|
// 获取在线人数
|
|
|
GetOnlinePersonNum(context.Context, *emptypb.Empty) (*GetOnlinePersonNumReply, error)
|
|
GetOnlinePersonNum(context.Context, *emptypb.Empty) (*GetOnlinePersonNumReply, error)
|
|
|
|
|
+ // 查询用户全部的未读数
|
|
|
|
|
+ FindUserAllUnreadNum(context.Context, *common.IdentifyIdRequest) (*UnreadNumReply, error)
|
|
|
|
|
+ // 查询接待员全部的未读数
|
|
|
|
|
+ FindPartnerAllUnreadNum(context.Context, *common.IdentifyIdRequest) (*UnreadNumReply, error)
|
|
|
mustEmbedUnimplementedChatServer()
|
|
mustEmbedUnimplementedChatServer()
|
|
|
}
|
|
}
|
|
|
|
|
|
|
@@ -567,6 +593,12 @@ func (UnimplementedChatServer) GetRoomProfit(context.Context, *common.RoomIDRequ
|
|
|
func (UnimplementedChatServer) GetOnlinePersonNum(context.Context, *emptypb.Empty) (*GetOnlinePersonNumReply, error) {
|
|
func (UnimplementedChatServer) GetOnlinePersonNum(context.Context, *emptypb.Empty) (*GetOnlinePersonNumReply, error) {
|
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetOnlinePersonNum not implemented")
|
|
return nil, status.Errorf(codes.Unimplemented, "method GetOnlinePersonNum not implemented")
|
|
|
}
|
|
}
|
|
|
|
|
+func (UnimplementedChatServer) FindUserAllUnreadNum(context.Context, *common.IdentifyIdRequest) (*UnreadNumReply, error) {
|
|
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method FindUserAllUnreadNum not implemented")
|
|
|
|
|
+}
|
|
|
|
|
+func (UnimplementedChatServer) FindPartnerAllUnreadNum(context.Context, *common.IdentifyIdRequest) (*UnreadNumReply, error) {
|
|
|
|
|
+ return nil, status.Errorf(codes.Unimplemented, "method FindPartnerAllUnreadNum not implemented")
|
|
|
|
|
+}
|
|
|
func (UnimplementedChatServer) mustEmbedUnimplementedChatServer() {}
|
|
func (UnimplementedChatServer) mustEmbedUnimplementedChatServer() {}
|
|
|
|
|
|
|
|
// UnsafeChatServer may be embedded to opt out of forward compatibility for this service.
|
|
// UnsafeChatServer may be embedded to opt out of forward compatibility for this service.
|
|
@@ -1174,6 +1206,42 @@ func _Chat_GetOnlinePersonNum_Handler(srv interface{}, ctx context.Context, dec
|
|
|
return interceptor(ctx, in, info, handler)
|
|
return interceptor(ctx, in, info, handler)
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+func _Chat_FindUserAllUnreadNum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
+ in := new(common.IdentifyIdRequest)
|
|
|
|
|
+ if err := dec(in); err != nil {
|
|
|
|
|
+ return nil, err
|
|
|
|
|
+ }
|
|
|
|
|
+ if interceptor == nil {
|
|
|
|
|
+ return srv.(ChatServer).FindUserAllUnreadNum(ctx, in)
|
|
|
|
|
+ }
|
|
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
|
|
+ Server: srv,
|
|
|
|
|
+ FullMethod: "/api.chat.Chat/FindUserAllUnreadNum",
|
|
|
|
|
+ }
|
|
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
+ return srv.(ChatServer).FindUserAllUnreadNum(ctx, req.(*common.IdentifyIdRequest))
|
|
|
|
|
+ }
|
|
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
|
|
+func _Chat_FindPartnerAllUnreadNum_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
|
|
|
|
|
+ in := new(common.IdentifyIdRequest)
|
|
|
|
|
+ if err := dec(in); err != nil {
|
|
|
|
|
+ return nil, err
|
|
|
|
|
+ }
|
|
|
|
|
+ if interceptor == nil {
|
|
|
|
|
+ return srv.(ChatServer).FindPartnerAllUnreadNum(ctx, in)
|
|
|
|
|
+ }
|
|
|
|
|
+ info := &grpc.UnaryServerInfo{
|
|
|
|
|
+ Server: srv,
|
|
|
|
|
+ FullMethod: "/api.chat.Chat/FindPartnerAllUnreadNum",
|
|
|
|
|
+ }
|
|
|
|
|
+ handler := func(ctx context.Context, req interface{}) (interface{}, error) {
|
|
|
|
|
+ return srv.(ChatServer).FindPartnerAllUnreadNum(ctx, req.(*common.IdentifyIdRequest))
|
|
|
|
|
+ }
|
|
|
|
|
+ return interceptor(ctx, in, info, handler)
|
|
|
|
|
+}
|
|
|
|
|
+
|
|
|
// Chat_ServiceDesc is the grpc.ServiceDesc for Chat service.
|
|
// Chat_ServiceDesc is the grpc.ServiceDesc for Chat service.
|
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
// It's only intended for direct use with grpc.RegisterService,
|
|
|
// and not to be introspected or modified (even as a copy)
|
|
// and not to be introspected or modified (even as a copy)
|
|
@@ -1313,6 +1381,14 @@ var Chat_ServiceDesc = grpc.ServiceDesc{
|
|
|
MethodName: "GetOnlinePersonNum",
|
|
MethodName: "GetOnlinePersonNum",
|
|
|
Handler: _Chat_GetOnlinePersonNum_Handler,
|
|
Handler: _Chat_GetOnlinePersonNum_Handler,
|
|
|
},
|
|
},
|
|
|
|
|
+ {
|
|
|
|
|
+ MethodName: "FindUserAllUnreadNum",
|
|
|
|
|
+ Handler: _Chat_FindUserAllUnreadNum_Handler,
|
|
|
|
|
+ },
|
|
|
|
|
+ {
|
|
|
|
|
+ MethodName: "FindPartnerAllUnreadNum",
|
|
|
|
|
+ Handler: _Chat_FindPartnerAllUnreadNum_Handler,
|
|
|
|
|
+ },
|
|
|
},
|
|
},
|
|
|
Streams: []grpc.StreamDesc{},
|
|
Streams: []grpc.StreamDesc{},
|
|
|
Metadata: "chat.proto",
|
|
Metadata: "chat.proto",
|