完成手动续期后台任务及权限隔离并更新回归进度

保留管理与业务续期调度,增加系统级幂等任务、取消传播和统计审计原子收尾;前端跟踪真实任务状态。原生 Linux 全后端、静态检查、相关专项二十次重复及前端二百七十二项测试和生产构建通过,未进行正式生产部署。
This commit is contained in:
xuans committed 2026-10-02 21:32:30 +08:00
1 parent 4ab3f93beb
commit 413a0e66a9
25 files changed
+739 -107

No files matched your search

@@ -14,8 +14,8 @@ func (r *SQLTaskRepository) recordCompletionAudit(ctx context.Context, tx *sql.T
}
result, err := tx.ExecContext(ctx, r.query(`INSERT INTO audit_logs
(action, resource_type, resource_id, status, message, created_at, scope_type, project_id, task_id, operator_id)
SELECT ?, CASE WHEN scope_type = 'system' THEN 'management_certificate' ELSE 'domain' END,
domain_id, ?, ?, ?, scope_type, project_id, id, operator_id
SELECT ?, CASE WHEN task_type = 'renewal_check' THEN 'task' WHEN scope_type = 'system' THEN 'management_certificate' ELSE 'domain' END,
CASE WHEN task_type = 'renewal_check' THEN id ELSE domain_id END, ?, ?, ?, scope_type, project_id, id, operator_id
FROM tasks WHERE id = ?`), completion.AuditAction, status, completion.Message,
completion.FinishedAt.UTC(), completion.TaskID)
if err != nil {