perf: 优化部分接口dao层查询

This commit is contained in:
insistence
2024-07-10 21:29:50 +08:00
parent 36f45b2c26
commit 0ee473fd07
4 changed files with 18 additions and 9 deletions

View File

@@ -168,7 +168,7 @@ class MenuDao:
menu_count = (await db.execute(
select(func.count('*'))
.select_from(SysMenu)
.where(SysMenu.menu_id == menu_id)
.where(SysMenu.parent_id == menu_id)
)).scalar()
return menu_count