feat: 新增可配置通知中心,支持扫描式/埋点式通知规则与手动群发

新增通知规则实体、扫描任务、API与管理界面,重构站内通知支持用户/电工双类型,移除硬编码的证照到期提醒,新增工单派单、电工审核结果等通知触发场景,调整菜单与数据库结构适配新通知体系。
This commit is contained in:
andyesfly committed 2026-10-06 11:53:02 +08:00
1 parent 91aa3c06f0
commit 6cf6a3d5b9
36 files changed
+3309 -246

No files matched your search

+4 -4
View File
@@ -12,23 +12,23 @@ export class NoticeController {
@Get("/")
async list(@Query() query: any) {
return await this.noticeService.listMy(this.currentUserId(), query);
return await this.noticeService.listMy("user", this.currentUserId(), query);
}
// 注意:静态路径必须注册在动态路径 /:id/read 之前
@Get("/unread-count")
async unreadCount() {
return await this.noticeService.unreadCount(this.currentUserId());
return await this.noticeService.unreadCount("user", this.currentUserId());
}
@Put("/read-all")
async markAllRead() {
return await this.noticeService.markAllRead(this.currentUserId());
return await this.noticeService.markAllRead("user", this.currentUserId());
}
@Put("/:id/read")
async markRead(@Param("id") id: string) {
return await this.noticeService.markRead(this.currentUserId(), Number(id));
return await this.noticeService.markRead("user", this.currentUserId(), Number(id));
}
private currentUserId(): number {