From 25d7ff7371271184d26d8c333077ccfdf7e03f32 Mon Sep 17 00:00:00 2001 From: tangweijie <877588133@qq.com> Date: Thu, 15 Jan 2026 20:16:01 +0800 Subject: [PATCH] =?UTF-8?q?docs:=20=E6=9B=B4=E6=96=B0=E8=BF=9B=E5=BA=A6?= =?UTF-8?q?=E8=AE=B0=E5=BD=95=EF=BC=8C=E6=B7=BB=E5=8A=A0=E4=BB=A3=E7=A0=81?= =?UTF-8?q?=E5=AE=A1=E6=9F=A5=E4=BF=AE=E5=A4=8D=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CLAUDE.md | 36 +++++++++++++++++++++++++++++++++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index a9c72e4..d8324f4 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -199,6 +199,13 @@ MySQL Database - ✅ Batch delete operations - ✅ Menu permissions SQL scripts +**Recent Updates (2026-01-15)**: +- Code review completed for questionnaire modules (Question, Questionnaire, QuestionnaireRecord) +- Backend fixes: VO field synchronization, batch update optimization, empty validation +- Frontend fixes: TypeScript type definitions, date formatting standardization +- Added enum classes: QuestionnaireStatusEnum, QuestionnaireRecordStatusEnum, QuestionnaireRecordPassStatusEnum +- Added database migration scripts for new columns + ## Database Configuration **Development Database**: @@ -225,11 +232,33 @@ Password: (configured in application-local.yaml) **Mock Settings** (application-local.yaml): ```yaml yudao: - mock: - enable: true - secret: emsoft + security: + mock-enable: true # 是否开启 Token 的模拟机制(生产环境必须关闭) + mock-secret: emsoft # Token 模拟机制的 Token 前缀 ``` +**使用场景**:方便使用 Postman、Swagger 调试接口时模拟 Token 认证,无需真实登录。 + +**多租户调用方式**: +```bash +# 格式:Authorization: Bearer {mockSecret}{用户ID} +# 必须传递 tenant-id 请求头 + +curl -X GET "{{url}}" \ + -H "Authorization: Bearer emsoft1" \ + -H "tenant-id: 1" +``` + +**说明**: +| 参数 | 说明 | 示例值 | +|------|------|--------| +| `Authorization` | mock token,格式 `{mockSecret}{userId}` | `Bearer emsoft1` 表示用户 ID 为 1 | +| `tenant-id` | 租户 ID(多租户场景必传) | `1` | + +**示例**: +- 模拟用户 ID=1,租户 ID=1:`Authorization: Bearer emsoft1` + `tenant-id: 1` +- 模拟用户 ID=2,租户 ID=1:`Authorization: Bearer emsoft2` + `tenant-id: 1` + ### Frontend Configuration **Location**: `frontend/` @@ -424,3 +453,4 @@ export const {Module}Api = { **Debug Mode**: - Backend: Add `--debug` to mvn command for remote debugging on port 5005 - Frontend: Browser dev tools + Vue DevTools browser extension +