From d52bbda8c313343e73f8efc5f1db4dbb0c8e9227 Mon Sep 17 00:00:00 2001 From: zhugeliang Date: Fri, 24 Apr 2026 18:03:35 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E5=AE=8C=E5=96=84=E4=B8=89=E4=BB=BD?= =?UTF-8?q?=E6=9E=84=E5=BB=BA=E9=97=A8=E7=A6=81=E6=96=87=E6=A1=A3=20-=20?= =?UTF-8?q?=E8=A1=A5=E5=85=85=E5=89=8D=E5=90=8E=E7=AB=AF=E5=8D=8F=E5=90=8C?= =?UTF-8?q?=E6=A3=80=E6=9F=A5=E3=80=81Java=E5=90=8E=E7=AB=AF=E9=97=A8?= =?UTF-8?q?=E7=A6=81=E3=80=81=E6=95=B0=E6=8D=AE=E5=BA=93=E5=8F=98=E6=9B=B4?= =?UTF-8?q?=E5=AD=97=E6=AE=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 架构评审改进项: - frontend-checklist.md: 增加后端Maven编译、数据库脚本、接口兼容性检查 - cicd-gatekeeper.md: 补充Java后端构建配置(SpotBugs)、分阶段覆盖率目标 - commit-template.md: 增加数据库变更影响评估字段、精简截图要求 --- docs/specs/cicd-gatekeeper.md | 30 ++++++++++++++++++++++++++++-- docs/specs/commit-template.md | 6 ++++++ docs/specs/frontend-checklist.md | 20 ++++++++++++++++++++ 3 files changed, 54 insertions(+), 2 deletions(-) diff --git a/docs/specs/cicd-gatekeeper.md b/docs/specs/cicd-gatekeeper.md index 8bdee6ab..f540b635 100644 --- a/docs/specs/cicd-gatekeeper.md +++ b/docs/specs/cicd-gatekeeper.md @@ -32,7 +32,7 @@ **触发时机**:代码推送到远程仓库后 **验证内容**: - 完整的测试套件(单元+集成+端到端) -- 代码覆盖率检查(≥80%) +- 代码覆盖率检查(分阶段目标:Q1≥30%,Q2≥50%,Q3≥80%) - 安全扫描(SAST) - 构建产物验证 - 部署到测试环境 @@ -52,7 +52,33 @@ ## ⚙️ 具体配置要求 ### ESLint 配置 -```javascript +``` + + +### Java 后端配置 +```xml + + + org.apache.maven.plugins + maven-compiler-plugin + 3.8.1 + + + com.github.spotbugs + spotbugs-maven-plugin + 4.2.0 + +``` + +### 数据库迁移配置 +```yaml +# application.yml Flyway配置 +flyway: + enabled: true + locations: classpath:db/migration + baseline-on-migrate: true +``` +javascript // .eslintrc.js 关键配置 module.exports = { plugins: ['import'], diff --git a/docs/specs/commit-template.md b/docs/specs/commit-template.md index c06d1c26..42544dba 100644 --- a/docs/specs/commit-template.md +++ b/docs/specs/commit-template.md @@ -25,6 +25,12 @@ refactor(nurse): 重构护士站护理记录组件 - **技术方案**:采用的技术方案和设计思路 - **兼容性**:是否涉及API或数据结构变更 + +## 🗄️ 数据库变更 +- **表结构变更**:列出新增/修改的表和字段 +- **数据迁移**:是否需要数据迁移脚本 +- **回滚方案**:数据库变更的回滚策略 + ## ✅ 验证情况 - **测试覆盖**:单元测试、集成测试覆盖情况 - **手动验证**:手动测试的场景和结果 diff --git a/docs/specs/frontend-checklist.md b/docs/specs/frontend-checklist.md index 3709eb11..a659448a 100644 --- a/docs/specs/frontend-checklist.md +++ b/docs/specs/frontend-checklist.md @@ -66,6 +66,26 @@ - [ ] 数据兼容性已确认 - [ ] 紧急联系人已明确 + +## 🔧 后端检查项 + +### 编译验证 +- [ ] Maven编译成功(`mvn clean compile`) +- [ ] 无编译错误,仅有可接受的警告 +- [ ] 依赖版本兼容性确认 + +### 数据库脚本 +- [ ] DDL/DML脚本语法正确 +- [ ] 回滚脚本已准备 +- [ ] 数据迁移脚本已测试 + +## 🔄 前后端协同 + +### 接口兼容性 +- [ ] API接口契约变更已双方确认 +- [ ] 前端调用后端接口正常 +- [ ] 错误码处理逻辑一致 + ## ✅ 最终确认 ### 发布前最后检查