mirror of
https://github.com/fastapi-practices/fastapi-best-architecture.git
synced 2026-09-21 05:02:49 +00:00
Update the dict pagination query parameters (#689)
* Update the dict pagination query parameters * Update the dict pagination query parameters * Update version
This commit is contained in:
@@ -24,7 +24,7 @@ class DictDataService:
|
||||
:return:
|
||||
"""
|
||||
async with async_db_session() as db:
|
||||
dict_data = await dict_data_dao.get_with_relation(db, pk)
|
||||
dict_data = await dict_data_dao.get(db, pk)
|
||||
if not dict_data:
|
||||
raise errors.NotFoundError(msg='字典数据不存在')
|
||||
return dict_data
|
||||
@@ -36,16 +36,22 @@ class DictDataService:
|
||||
return dict_datas
|
||||
|
||||
@staticmethod
|
||||
async def get_select(*, label: str | None, value: str | None, status: int | None) -> Select:
|
||||
async def get_select(
|
||||
*, type_code: str | None, label: str | None, value: str | None, status: int | None, type_id: int | None
|
||||
) -> Select:
|
||||
"""
|
||||
获取字典数据列表查询条件
|
||||
|
||||
:param type_code: 字典类型编码
|
||||
:param label: 字典数据标签
|
||||
:param value: 字典数据键值
|
||||
:param status: 状态
|
||||
:param type_id: 字典类型 ID
|
||||
:return:
|
||||
"""
|
||||
return await dict_data_dao.get_list(label=label, value=value, status=status)
|
||||
return await dict_data_dao.get_list(
|
||||
type_code=type_code, label=label, value=value, status=status, type_id=type_id
|
||||
)
|
||||
|
||||
@staticmethod
|
||||
async def create(*, obj: CreateDictDataParam) -> None:
|
||||
|
||||
Reference in New Issue
Block a user