From 48730369e52b1789ab629cbc92bab2905a3bb4b7 Mon Sep 17 00:00:00 2001 From: yanlongqi Date: Mon, 17 Nov 2025 21:44:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=96=87=E6=A1=A3=E4=B8=AD?= =?UTF-8?q?=E5=85=B3=E4=BA=8Escript=E6=96=87=E4=BB=B6=E5=A4=B9=E7=9A=84?= =?UTF-8?q?=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CLAUDE.md | 5 ----- README.md | 8 -------- docs/fix_practice_progress_index.md | 8 +------- 3 files changed, 1 insertion(+), 20 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 9805a22..db1dd1a 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -66,8 +66,6 @@ func MiddlewareName() gin.HandlerFunc { - [ai_grading.go](internal/services/ai_grading.go) - AI评分服务 - **internal/database/** - 数据库连接和初始化 - **pkg/config/** - 配置管理(数据库配置、AI配置等) -- **scripts/** - 工具脚本 - - [import_questions.go](scripts/import_questions.go) - 题目数据导入脚本 ## 常用命令 @@ -84,9 +82,6 @@ go fmt ./... # 检查代码常见问题 go vet ./... - -# 导入练习题数据(首次运行需要) -go run scripts/import_questions.go ``` ### 构建 diff --git a/README.md b/README.md index c6bdd1b..edaa230 100644 --- a/README.md +++ b/README.md @@ -143,14 +143,6 @@ go build -o bin/server.exe main.go - `updated_at` - 更新时间 - `deleted_at` - 软删除时间 -### 数据导入 - -首次运行项目需要导入练习题数据: - -```bash -# 确保 practice_question_pool.json 文件在项目根目录 -go run scripts/import_questions.go -``` ## AI评分配置 diff --git a/docs/fix_practice_progress_index.md b/docs/fix_practice_progress_index.md index 6da1eef..aa8d883 100644 --- a/docs/fix_practice_progress_index.md +++ b/docs/fix_practice_progress_index.md @@ -73,12 +73,7 @@ type PracticeProgress struct { psql -U your_username -d your_database ``` -2. **执行 SQL 脚本**: - ```bash - \i scripts/fix_practice_progress_index.sql - ``` - - 或手动执行: +2. **手动执行 SQL**: ```sql -- 删除旧索引 DROP INDEX IF EXISTS idx_user_question; @@ -188,4 +183,3 @@ id | user_id | type | current_question_id - 模型定义:`internal/models/practice_progress.go` - 写入逻辑:`internal/handlers/practice_handler.go:356-387` -- SQL 修复脚本:`scripts/fix_practice_progress_index.sql`