add: player-rpc 增加按用户查询打手

This commit is contained in:
zetaloop
2026-04-04 02:42:52 +08:00
parent 98aac81b43
commit 85ce6a45c5
5 changed files with 106 additions and 0 deletions
@@ -49,6 +49,7 @@ type (
UpdatePlayers(ctx context.Context, in *UpdatePlayersReq, opts ...grpc.CallOption) (*UpdatePlayersResp, error)
DelPlayers(ctx context.Context, in *DelPlayersReq, opts ...grpc.CallOption) (*DelPlayersResp, error)
GetPlayersById(ctx context.Context, in *GetPlayersByIdReq, opts ...grpc.CallOption) (*GetPlayersByIdResp, error)
GetPlayerByUserId(ctx context.Context, in *SearchPlayersReq, opts ...grpc.CallOption) (*GetPlayersByIdResp, error)
SearchPlayers(ctx context.Context, in *SearchPlayersReq, opts ...grpc.CallOption) (*SearchPlayersResp, error)
}
@@ -110,6 +111,11 @@ func (m *defaultPlayerService) GetPlayersById(ctx context.Context, in *GetPlayer
return client.GetPlayersById(ctx, in, opts...)
}
func (m *defaultPlayerService) GetPlayerByUserId(ctx context.Context, in *SearchPlayersReq, opts ...grpc.CallOption) (*GetPlayersByIdResp, error) {
client := pb.NewPlayerServiceClient(m.cli.Conn())
return client.GetPlayerByUserId(ctx, in, opts...)
}
func (m *defaultPlayerService) SearchPlayers(ctx context.Context, in *SearchPlayersReq, opts ...grpc.CallOption) (*SearchPlayersResp, error) {
client := pb.NewPlayerServiceClient(m.cli.Conn())
return client.SearchPlayers(ctx, in, opts...)