Download apps/client/services/query/client_batch_query_service.py from jun2024/fachuan: direct link, hf CLI and curl.
- Browser
- Download file 862 Bytes
-
https://huggingface.co/spaces/jun2024/fachuan/resolve/main/apps/client/services/query/client_batch_query_service.py
- Command line
-
hf download hf://spaces/jun2024/fachuan/apps/client/services/query/client_batch_query_service.py
-
curl -L -o client_batch_query_service.py https://huggingface.co/spaces/jun2024/fachuan/resolve/main/apps/client/services/query/client_batch_query_service.py
862 Bytes
| """当事人批量查询服务。""" | |
| from __future__ import annotations | |
| from typing import TYPE_CHECKING | |
| from apps.client.services.client_internal_query_service import ClientInternalQueryService | |
| if TYPE_CHECKING: | |
| from apps.client.models import Client | |
| class ClientBatchQueryService: | |
| def __init__(self, internal_query_service: ClientInternalQueryService | None = None) -> None: | |
| self._internal_query_service = internal_query_service | |
| def internal_query_service(self) -> ClientInternalQueryService: | |
| if self._internal_query_service is None: | |
| self._internal_query_service = ClientInternalQueryService() | |
| return self._internal_query_service | |
| def get_clients_by_ids(self, *, client_ids: list[int]) -> list[Client]: | |
| return self.internal_query_service.get_clients_by_ids(client_ids=client_ids) | |