feat: 08 创作者与内容审核落地(入驻审核 / 内容提交审核 / 定时发布 / 分集定价)
为什么: 1) 内容是创作者供的,必须有一条可管控的供给链路:创作者入驻要审、内容提交要审、 审核通过才能真正上架 —— 否则平台无法对内容和主体负责。 2) 审核不能绕过状态机。内容提交审核通过后,是顺着短剧状态机 SUBMIT → APPROVE → PUBLISH 推上去,而不是直接写 status 字段, 这样审核记录与操作日志都不会缺环。 3) 定时发布(publish_at 到点自动上线)同样走状态机,并且做成幂等任务: 重复执行不会把已上线的剧再推一次。 4) 定价落在 is_free / unlock_coin 上,与权益表解耦:改价立即影响播放与下载判定, 但已购用户的权益不受影响,不会因为改价把用户买过的东西收回去。 5) 补齐 PM 草稿未做的部分:5 个权限点 + 3 条后台菜单(含前端组件路径)+ 超管授权(幂等), 以及后台定价页需要的价格读取接口 GET /admin/prices。
This commit is contained in:
1 parent
7e730fbbca
commit
1fb8427f28
25 files changed
+935
-3
No files matched your search
+31
-1
@@ -55,6 +55,14 @@ INSERT INTO sys_permission (code, name, group_name, type, sort) VALUES
|
||||
('reconcile:run', '手动对账', '订单与权益', 'BUTTON', 126)
|
||||
ON CONFLICT (code) DO NOTHING;
|
||||
|
||||
INSERT INTO sys_permission (code, name, group_name, type, sort) VALUES
|
||||
('creator:list', '查看创作者', '创作者管理', 'BUTTON', 131),
|
||||
('creator:audit', '创作者入驻审核','创作者管理', 'BUTTON', 132),
|
||||
('submission:list', '查看内容提交', '创作者管理', 'BUTTON', 133),
|
||||
('submission:audit', '内容提交审核', '创作者管理', 'BUTTON', 134),
|
||||
('price:update', '配置分集价格', '内容管理', 'BUTTON', 135)
|
||||
ON CONFLICT (code) DO NOTHING;
|
||||
|
||||
-- 超管默认拥有全部权限点
|
||||
INSERT INTO sys_role_permission (role_id, permission_id)
|
||||
SELECT r.id, p.id
|
||||
@@ -65,7 +73,29 @@ WHERE r.code = 'super_admin'
|
||||
'comment:list', 'comment:audit', 'report:list', 'report:handle',
|
||||
'sensitive-word:list', 'sensitive-word:update',
|
||||
'order:list', 'order:update', 'entitlement:list', 'entitlement:update',
|
||||
'wallet:update', 'reconcile:run')
|
||||
'wallet:update', 'reconcile:run',
|
||||
'creator:list', 'creator:audit', 'submission:list', 'submission:audit',
|
||||
'price:update')
|
||||
ON CONFLICT DO NOTHING;
|
||||
|
||||
-- ---------- 菜单:创作者管理 ----------
|
||||
-- component 指向 src/views/creator/ 下的页面,前端按这个字符串动态加载。
|
||||
INSERT INTO sys_menu (id, parent_id, title, route_path, route_name, component, redirect, icon,
|
||||
permission_code, type, always_show, affix, sort) VALUES
|
||||
(17, 0, '创作者管理', '/creator', 'CreatorCenter', '#', '/creator/creators', 'ep:user-filled', 'creator:list', 'CATALOG', 1, 0, 5),
|
||||
(18, 17, '创作者入驻', 'creators', 'creators', 'views/creator/CreatorAuditView', '', '', 'creator:list', 'MENU', 0, 0, 1),
|
||||
(19, 17, '内容审核', 'submissions', 'submissions', 'views/creator/SubmissionAuditView', '', '', 'submission:list', 'MENU', 0, 0, 2)
|
||||
ON CONFLICT (id) DO UPDATE SET parent_id = EXCLUDED.parent_id, title = EXCLUDED.title,
|
||||
route_path = EXCLUDED.route_path, route_name = EXCLUDED.route_name, component = EXCLUDED.component,
|
||||
redirect = EXCLUDED.redirect, icon = EXCLUDED.icon, permission_code = EXCLUDED.permission_code,
|
||||
type = EXCLUDED.type, always_show = EXCLUDED.always_show, affix = EXCLUDED.affix, sort = EXCLUDED.sort;
|
||||
|
||||
INSERT INTO sys_role_menu (role_id, menu_id)
|
||||
SELECT r.id, m.id
|
||||
FROM sys_role r
|
||||
CROSS JOIN sys_menu m
|
||||
WHERE r.code = 'super_admin'
|
||||
AND m.id IN (17, 18, 19)
|
||||
ON CONFLICT DO NOTHING;
|
||||
|
||||
-- 第一阶段新增的白名单数据(当前阶段都是免费内容,先把演示商品占位好)
|
||||
|
||||
Reference in new issue
Block a user