liuyun 35028a69d2
Some checks are pending
CI / backend (push) Waiting to run
CI / frontend (push) Waiting to run
docs(spec): 归档 in-app-notification + 同步通知主 spec
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-11 22:26:15 +08:00

31 lines
1.4 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

## 1. 数据模型与迁移
- [x] 1.1 Prisma:`Notice`(sys_notice,软删)+ `NoticeRead`(sys_notice_read,唯一 tenant_code+notice_id+user_id)
- [x] 1.2 生成并部署 migration
## 2. 后端 notices 模块
- [x] 2.1 `Permissions` 加 `notice: { list, create, update, delete }`
- [x] 2.2 新增 `notices` 模块(dto/service/controller/module),service `extends BaseCrudService`
- [x] 2.3 管理侧 CRUD:`GET/POST/PATCH/DELETE /notices`,挂权限 + `@AuditLog`
- [x] 2.4 用户侧:`GET /notices/mine`(enabled + 已读状态)、`GET /notices/unread-count`、`POST /notices/:id/read`、`POST /notices/read-all`(仅登录态)
- [x] 2.5 `app.module.ts` 注册 `NoticesModule`
## 3. 资源注册
- [x] 3.1 `tenant-template` 加 notice 菜单(parent=system)+ 管理侧接口资源
- [x] 3.2 存量租户跑 `pnpm sync:resources`
## 4. 前端
- [x] 4.1 `api/notice.ts`:类型 + 管理 CRUD + mine/unread-count/read/read-all
- [x] 4.2 notice store:未读数 + 列表 + 30s 轮询定时器
- [x] 4.3 `ty-header` 顶栏铃铛:`el-badge` 未读角标 + `el-popover` 列表 + 标记单条/全部已读
- [x] 4.4 通知管理页 `pages/system/notice/index.vue`(ty-crud,`defineOptions({ name: 'notice' })`)
## 5. 验证
- [x] 5.1 后端 build + 单测 + e2e 通过
- [x] 5.2 前端 type-check 通过
- [x] 5.3 冒烟:发布通知 → 未读数=1 → 标记已读 → 未读数=0