实现查看门禁设备列表接口

This commit is contained in:
haotian 2025-09-10 15:13:28 +08:00
parent db6b9bbcd2
commit 05c8891a5a
2 changed files with 3 additions and 2 deletions

View File

@ -28,6 +28,7 @@ async def get_system_door_list(
door_page_query: DoorPageQueryModel = Depends(DoorPageQueryModel.as_query),
query_db: AsyncSession = Depends(get_db),
):
# 获取分页数据
door_page_query_result = await DoorService.get_door_list_services(query_db, door_page_query, is_page=True)
logger.info('获取成功')

View File

@ -69,10 +69,10 @@ class DoorDao:
query = (
select(Door)
.where(
Door.index_code == query_object.index_code if query_object.index_code else True,
# Door.index_code == query_object.index_code if query_object.index_code else True,
Door.name.like(f'%{query_object.name}%') if query_object.name else True,
Door.install_location.like(f'%{query_object.install_location}%') if query_object.install_location else True,
Door.status == query_object.status if query_object.status else True,
# Door.status == query_object.status if query_object.status else True,
Door.permission == query_object.permission if query_object.permission else True,
)
.order_by(Door.id)