feat: 08 数据看板落地(总览 + 转码看板,只读)
为什么: 1) 前面几块把用户、内容、播放、交易、媒资的数据都落库了,运营需要一个地方一次看完, 否则每个指标都要去查库或翻后台列表。 2) 看板最容易出的问题是"数字看起来对但口径不清",所以每个指标都在代码注释和 docs/api-phase1.md 里写死口径(时间范围、统计维度),前端 tooltip 直接复用。 3) 取不到数据源的指标(DAU、CDN 流量成本、商店订单金额)一律返回 null 并在 notes 里 说明缺什么、怎么补 —— 不用 0 冒充,避免运营拿假数字做判断。 4) 站在接入层做只读聚合而不是新建模块:它跨六个域取数,建模块只会把依赖再摊开一层, 而它只读不写,放在 admin-api 改动面最小。
This commit is contained in:
1 parent
1fb8427f28
commit
d67d9daf8c
5 files changed
+359
-3
No files matched your search
+6
-1
@@ -63,6 +63,11 @@ INSERT INTO sys_permission (code, name, group_name, type, sort) VALUES
|
||||
('price:update', '配置分集价格', '内容管理', 'BUTTON', 135)
|
||||
ON CONFLICT (code) DO NOTHING;
|
||||
|
||||
-- 看板权限:菜单在 3-4 补页面时一起加,避免菜单指向不存在的组件
|
||||
INSERT INTO sys_permission (code, name, group_name, type, sort) VALUES
|
||||
('dashboard:view', '查看运营大盘', '数据看板', 'BUTTON', 141)
|
||||
ON CONFLICT (code) DO NOTHING;
|
||||
|
||||
-- 超管默认拥有全部权限点
|
||||
INSERT INTO sys_role_permission (role_id, permission_id)
|
||||
SELECT r.id, p.id
|
||||
@@ -75,7 +80,7 @@ WHERE r.code = 'super_admin'
|
||||
'order:list', 'order:update', 'entitlement:list', 'entitlement:update',
|
||||
'wallet:update', 'reconcile:run',
|
||||
'creator:list', 'creator:audit', 'submission:list', 'submission:audit',
|
||||
'price:update')
|
||||
'price:update', 'dashboard:view')
|
||||
ON CONFLICT DO NOTHING;
|
||||
|
||||
-- ---------- 菜单:创作者管理 ----------
|
||||
|
||||
Reference in new issue
Block a user