feat: 持久化通知 outbox 记录

- notifications: 通知发送前写入 outbox,并在成功、失败或未配置时回写状态

- deploy-runs: 审计通知结果时带上 outboxMessageId

- outbox: 新增超级管理员查询最近通知投递摘要接口
This commit is contained in:
湛兮
2026-06-12 03:22:38 +08:00
parent 36c22eb00d
commit 4597dcaa38
9 changed files with 406 additions and 10 deletions
@@ -361,6 +361,7 @@ export class DeployExecutionService {
event,
channel: notification.channel,
reason: notification.reason,
outboxMessageId: notification.outboxMessageId,
},
});
@@ -547,6 +548,7 @@ export class DeployExecutionService {
event,
channel: notification.channel,
reason: notification.reason,
outboxMessageId: notification.outboxMessageId,
},
});
}
+4
View File
@@ -1,3 +1,6 @@
/**
* 发布记录应用服务负责创建、取消、同步发布单,并归档审计与通知结果。
*/
import { Injectable } from '@nestjs/common';
import { AuthService } from '../auth/auth.service';
import { AuthenticatedUser } from '../auth/auth.types';
@@ -370,6 +373,7 @@ export class DeployRunsService {
event,
channel: notification.channel,
reason: notification.reason,
outboxMessageId: notification.outboxMessageId,
},
});
}