16 Commits

Author SHA1 Message Date
liuyun
9c4fd6f4ca feat(c2): 工单模块(派单/调单/冲突/批量推荐)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-14 22:42:15 +08:00
liuyun
418dfb9dae feat(c2): 服务计划 + 老人个人项目库模块
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-14 22:27:34 +08:00
liuyun
1308675f80 feat(c1): elder 待遇档案模块(建档/状态机/掩码/上传)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-14 17:19:07 +08:00
liuyun
465057cce0 feat(c1): MinIO 存储模块
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-14 17:03:12 +08:00
liuyun
945fe5daa3 feat(c0): catalog 目录模块(属地加载 + 机构项目库)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-14 13:08:47 +08:00
liuyun
5a3beb4923 feat(c0): staff 人员模块(user_id 关联账号 + 归属组长)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-14 12:56:07 +08:00
liuyun
856e906740 feat(c0): agency 机构模块(按租户读写机构信息)
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-10-14 12:48:27 +08:00
liuyun
bad8639175 feat(notice): 站内通知(公告 + 已读追踪)
- Notice/NoticeRead 实体;管理侧 CRUD + 用户侧 mine/unread-count/read/read-all
- 资源注册 notice 菜单 + 接口

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-11 22:25:19 +08:00
liuyun
86832ce32d feat(session): 在线会话强踢 + 账号锁定/解锁
- JWT 引入 sid,单会话精确强退(sid 黑名单)与按用户踢全部(tokenVersion)
- User 新增 lockedAt/lockReason,登录/刷新/守卫统一拒绝锁定
- sessions 模块:活跃会话列表 + 单会话强退;users 新增 lock/unlock/kick-sessions
- 资源注册 + syncTenantResources 存量租户补齐脚本

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-11 21:35:43 +08:00
liuyun
ba1ae43e39 feat(security): helmet + CORS 白名单 + 限流 + 定时清理 + 时间契约 Unix 毫秒
- helmet 安全头 + CORS_ORIGIN 白名单 + Swagger 仅非生产
- @nestjs/throttler 全局限流(60s/100 次)
- @nestjs/schedule 定时清理过期 token 与旧日志
- API 时间统一 Unix 毫秒(TransformInterceptor 递归转换)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-11 16:54:08 +08:00
liuyun
7340658305 feat: enforce RBAC, audit/login logging, and seed script
收口 Phase 0 三处「声明未生效」:
- 三级鉴权落地:权限集存 Redis(key 前缀隔离多项目),@RequirePermissions 挂到全部受控接口,super_admin 角色绕过权限码与 data_scope
- 审计/登录日志自动落库:@AuditLog 装饰器 + 拦截器异步写入(写操作+登录登出),登录成功/失败均记 login_log(脱敏)
- seed 脚本:一键初始化租户 touyun/用户 touyun/超管 super_admin/全量资源树(48 资源全量授权)

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-10 23:19:41 +08:00
liuyun
c680fb9dc7 feat: log request body (masked, debug level) and drop headers from request logs
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-10 22:13:33 +08:00
liuyun
bbc06ae775 feat: add pino structured logging (stdout + optional file via env)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-10 21:31:05 +08:00
liuyun
39a4e21eed fix: rename logs module to audit-logs/login-logs (avoid gitignore collision)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-10 21:25:57 +08:00
liuyun
d8d3055c73 feat: backend foundation (Prisma 6 + MySQL, auth, tenant/soft-delete/data-scope filters, core CRUD)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-10 21:13:35 +08:00
liuyun
dc40ca3343 chore: init sysmgr-nest (NestJS scaffold)
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-10-10 14:03:17 +08:00