Files
opsxsql/backend/app
logan 0576b253e4 fix: 审批流修复 + 通知KeyError修复
审批流修复:
- 提交阶段(step_type=submit)自动approved,不再创建pending记录
- 审批权限添加auditor角色(require_role admin/dba/auditor)
- 审批完成判断排除execute步骤(step_type!=execute才计入has_next)
- review_ticket中加载workflow_steps用于step_type判断
- Ticket字段名修正: creator_id -> applicant_id

通知修复:
- send()中自动补充sql_preview字段(sql_content前100字符)
- 飞书/钉钉模板format改为format_map+安全fallback(缺失字段不报KeyError)
- DB中auditor用户role从developer修正为auditor

测试: 1182 passed, 0 failed
审批流全链路验证通过: 提交->DBA审核->审计员审核->admin执行->success
2026-05-25 11:41:03 +08:00
..