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

77 lines
2.2 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.
# Phase 22 完成报告:部署运维配置扩展
> 版本基线:v1.0.0-RC.2 → v1.1.0-dev | 日期:2026-09-08
> 对应 EPIC:EPIC-P22-V11
---
## 完成摘要
| 项目 | 内容 |
|------|------|
| Phase | 22 |
| 模块 | 部署运维配置扩展 |
| 状态 | ✅ 已完成 |
---
## 变更文件
### FeatureFlagConfig.java
新增 13 个 V1.1 Feature Flag 配置项,全部可通过 `application.yml` 覆盖。
### application.yml
新增 `features.*` 配置段,包含所有 V1.1 Flag 的默认值。
### FeatureFlagController.java
新增两个 API 端点:
- `GET /api/v1/operator/feature-flags` — 获取所有 Flag 当前值
- `PUT /api/v1/operator/feature-flags/{flagName}` — 动态更新单个 Flag
---
## Flag 配置详情
| Flag | 默认值 | 用途 |
|------|--------|------|
| counselingEnabled | true | 公益咨询功能总开关 |
| premaritalEnabled | true | 婚前辅导功能开关 |
| contentEnabled | true | 内容管理功能开关 |
| serviceLocationEnabled | true | 善缘服务站功能开关 |
| localEligibilityEnabled | true | 本地资格核验开关 |
| referralEnabled | true | 红娘转介功能开关 |
| mutualConsentEnabled | true | 活动互选二阶段同意开关 |
| serviceProgramEnabled | true | 专项公益服务项目开关 |
| livenessEnabled | false | 活体检测开关(预留,未接入第三方) |
| localEvidenceUploadEnabled | true | 本地资格佐证上传开关 |
| localEvidenceMaxFiles | 5 | 最大佐证文件数限制 |
| localEvidenceMaxFileSizeMB | 10 | 单个文件最大大小(MB) |
| localEvidenceAllowedTypes | jpg,png,pdf | 允许的文件格式 |
| counselingAttachmentsPrivate | true | 咨询附件是否使用私有存储桶 |
| counselingAttachmentsBucket | counseling-attachments | 咨询附件 S3 存储桶名称 |
---
## 使用方式
### 通过 application.yml 配置
```yaml
features:
counseling-enabled: true
liveness-enabled: false
```
### 通过运营后台 API 动态调整
```bash
# 查询所有 Flag
GET /api/v1/operator/feature-flags
# 动态开启/关闭
PUT /api/v1/operator/feature-flags/counselingEnabled
Body: {"value": false}
```
---
*Phase 22 完成。下一阶段:Phase 23(V1.1专项测试)*