This commit is contained in:
fengchuanhn@gmail.com
2026-05-21 16:38:11 +08:00
parent 8d5f5f2608
commit 13c8493e4c
8 changed files with 116 additions and 14 deletions

View File

@@ -6,7 +6,7 @@ from sqlalchemy.ext.asyncio import AsyncSession
from app.models.desktopConfig import DesktopConfig
async def list_all_as_map(db: AsyncSession) -> dict[str, str]:
result = await db.execute(select(DesktopConfig))
async def list_all_as_map(db: AsyncSession, oem_id: int = 1) -> dict[str, str]:
result = await db.execute(select(DesktopConfig).where(DesktopConfig.oem_id == oem_id))
rows = result.scalars().all()
return {row.name: row.value for row in rows}