1
0
Files
build.ems/docs/07-5GC OMC Database Diagrams.md
2023-09-07 10:47:34 +08:00

19 lines
558 B
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
## EMS Database
---
### 1. Relationship of menu, account, account_menu, title_info
![1679033737734](image/database/1679033737734.png)
通过多表联合查询可一次性获取某个账号的目录结果:
example, acouunt name='manager', lang-key='cn'
```sql
SELECT m.id, json_unquote(json_extract(t.title_json, '$.en')) as title, m.parent_id, m.sort_id FROM title_info t, menu m WHERE m.id IN (SELECT am.menu_id FROM account_menu am WHERE am.account_id = (SELECT id FROM account WHERE name='manager')) AND m.title_id = t.id ORDER BY m.id
```