1
This commit is contained in:
12
app/services/oem_desktop_config.py
Normal file
12
app/services/oem_desktop_config.py
Normal file
@@ -0,0 +1,12 @@
|
||||
"""desktop_configs 表:键值配置。"""
|
||||
|
||||
from sqlalchemy import select
|
||||
from sqlalchemy.ext.asyncio import AsyncSession
|
||||
|
||||
from app.models.desktopConfig import DesktopConfig
|
||||
|
||||
|
||||
async def list_all_as_map(db: AsyncSession,oem_id: int) -> 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}
|
||||
Reference in New Issue
Block a user