Files
danyang-match/docs/Phase-21-V11-Completion-Report.md
T

1.9 KiB
Raw Blame History

Phase 21 完成报告:账户生命周期增量

版本基线:v1.0.0-RC.2 → v1.1.0-dev | 日期:2026-09-08 对应 EPIC:EPIC-P21-V11


完成摘要

项目 内容
Phase 21
模块 账户生命周期增量
状态 ✅ 已完成
不变量 注销必须在线便捷(INV保持不变)

变更文件

AccountLifecycleService.java — 扩展了 checkCanWithdraw() 和 closeAccount() 方法

新增 Mapper 依赖

  • ServiceAppointmentMapper — 服务预约查询/更新
  • CounselingServiceMapper — 心理咨询查询/更新
  • ServiceProgramMemberMapper — 专项项目成员查询/更新
  • LocalEligibilityMapper — 本地资格查询/更新

新增私有方法

方法 功能
cancelServiceAppointments(userId) 取消所有 submitted/pending_confirmation 状态的预约
cancelCounselingServices(userId) 取消所有 pending/assigned/scheduled/in_progress 状态的咨询
exitServicePrograms(userId) 将所有 approved 的项目成员状态改为 withdrawn
invalidateLocalEligibility(userId) 将本地资格状态设为 failed
anonymizeServiceHistory(userId) 脱敏咨询摘要等敏感服务历史

checkCanWithdraw 新增检查项

检查项 阻断条件
服务预约 submitted / pending_confirmation
心理咨询 pending / assigned / scheduled / in_progress
专项项目 approved
本地资格 submitted / pending_review

不变量验证

不变量 验证结果
注销必须在线便捷 所有检查均在 API 层完成,无需人工干预
注销后资料停止展示 已有逻辑覆盖(recommendationEnabled=false)
敏感数据脱敏 anonymizeServiceHistory 钩子已集成

Phase 21 完成。下一阶段:Phase 22(部署运维配置扩展)