# shudao-main 接口完整清单 > 生成时间:2026/4/3 > 检查范围:shudao-main/shudao-go-backend 所有控制器及路由配置 --- ## 📊 接口统计 - **前端页面路由**: 4个 - **API接口**: 49个 - **总计**: 53个HTTP接口 --- ## 🌐 一、前端页面路由 | 序号 | 路由路径 | 方法 | 控制器方法 | 说明 | |------|---------|------|-----------|------| | 1 | `/` | GET | FrontendController.Index | 前端首页 | | 2 | `/stream-test` | GET | FrontendController.StreamTest | 流式接口测试页面 | | 3 | `/simple-stream-test` | GET | FrontendController.SimpleStreamTest | 简化版流式接口测试页面 | | 4 | `/stream-chat-with-db-test` | GET | FrontendController.StreamChatWithDBTest | 流式聊天数据库集成测试页面 | --- ## 🔌 二、API接口(apiv1 命名空间) ### 1️⃣ 认证模块 (1个接口) | 序号 | 路由路径 | 方法 | 控制器方法 | 说明 | 需要认证 | |------|---------|------|-----------|------|---------| | 1 | `/apiv1/auth/local_login` | POST | LocalAuthController.LocalLogin | 本地登录接口 | ❌ | --- ### 2️⃣ 聊天对话模块 (16个接口) | 序号 | 路由路径 | 方法 | 控制器方法 | 说明 | 需要认证 | |------|---------|------|-----------|------|---------| | 1 | `/apiv1/send_deepseek_message` | POST | ChatController.SendDeepSeekMessage | 发送DeepSeek消息 | ✅ | | 2 | `/apiv1/get_history_record` | GET | ChatController.GetHistoryRecord | 获取历史记录 | ✅ | | 3 | `/apiv1/re_produce_single_question` | POST | ChatController.ReProduceSingleQuestion | 重新生成单题 | ✅ | | 4 | `/apiv1/guess_you_want` | POST | ChatController.GuessYouWant | 猜你想问 | ✅ | | 5 | `/apiv1/get_user_recommend_question` | GET | ChatController.GetUserRecommendQuestion | 用户输入推荐问题 | ✅ | | 6 | `/apiv1/get_file_link` | GET | ChatController.GetFileLink | 根据文件名获取链接 | ✅ | | 7 | `/apiv1/delete_conversation` | POST | ChatController.DeleteConversation | 删除对话 | ✅ | | 8 | `/apiv1/delete_history_record` | POST | ChatController.DeleteHistoryRecord | 删除历史记录 | ✅ | | 9 | `/apiv1/delete_recognition_record` | POST | ChatController.DeleteRecognitionRecord | 删除隐患识别历史记录 | ✅ | | 10 | `/apiv1/save_ppt_outline` | POST | ChatController.SavePPTOutline | 保存PPT大纲 | ✅ | | 11 | `/apiv1/save_edit_document` | POST | ChatController.SaveEditDocument | AI写作保存编辑文档 | ✅ | | 12 | `/apiv1/online_search` | GET | ChatController.OnlineSearch | 联网搜索 | ✅ | | 13 | `/apiv1/save_online_search_result` | POST | ChatController.SaveOnlineSearchResult | 保存联网搜索结果 | ✅ | | 14 | `/apiv1/intent_recognition` | POST | ChatController.IntentRecognition | 意图识别接口 | ✅ | | 15 | `/apiv1/get_chromadb_document` | GET | ChatController.GetChromaDBDocument | 获取ChromaDB文档并生成回答 | ✅ | | 16 | `/apiv1/stream/chat-with-db` | POST | LiushiController.StreamChatWithDB | 流式聊天数据库集成接口 | ✅ | --- ### 3️⃣ 通用功能模块 (9个接口) | 序号 | 路由路径 | 方法 | 控制器方法 | 说明 | 需要认证 | |------|---------|------|-----------|------|---------| | 1 | `/apiv1/recommend_question` | GET | TotalController.GetRecommendQuestion | 获取推荐问题 | ✅ | | 2 | `/apiv1/submit_feedback` | POST | TotalController.SubmitFeedback | 提交意见反馈 | ✅ | | 3 | `/apiv1/get_policy_file` | GET | TotalController.GetPolicyFile | 获取政策文件 | ✅ | | 4 | `/apiv1/get_function_card` | GET | TotalController.GetFunctionCard | 获取功能卡片 | ✅ | | 5 | `/apiv1/get_hot_question` | GET | TotalController.GetHotQuestion | 获取热点问题 | ✅ | | 6 | `/apiv1/like_and_dislike` | POST | TotalController.LikeAndDislike | 点赞和踩 | ✅ | | 7 | `/apiv1/download_file` | GET | TotalController.GetPdfOssDownloadLink | 文件下载接口 | ✅ | | 8 | `/apiv1/policy_file_count` | POST | TotalController.GetPolicyFileViewAndDownloadCount | 政策文件查看下载统计 | ✅ | | 9 | `/apiv1/get_user_data_id` | GET | TotalController.GetUserDataID | 根据account_id获取用户数据ID | ✅ | --- ### 4️⃣ 考试模块 (3个接口) | 序号 | 路由路径 | 方法 | 控制器方法 | 说明 | 需要认证 | |------|---------|------|-----------|------|---------| | 1 | `/apiv1/re_modify_question` | POST | ExamController.ReModifyQuestion | 修改考试题目 | ✅ | | 2 | `/apiv1/exam/build_prompt` | POST | PromptController.BuildExamPrompt | 生成考试提示词 | ✅ | | 3 | `/apiv1/exam/build_single_prompt` | POST | PromptController.BuildSingleQuestionPrompt | 单题生成提示词 | ✅ | --- ### 5️⃣ 隐患识别模块 (7个接口) | 序号 | 路由路径 | 方法 | 控制器方法 | 说明 | 需要认证 | |------|---------|------|-----------|------|---------| | 1 | `/apiv1/hazard` | POST | HazardController.Hazard | 隐患识别 | ✅ | | 2 | `/apiv1/save_step` | POST | HazardController.SaveStep | 保存识别步骤 | ✅ | | 3 | `/apiv1/get_history_recognition_record` | GET | SceneController.GetHistoryRecognitionRecord | 获取历史识别记录 | ✅ | | 4 | `/apiv1/get_recognition_record_detail` | GET | SceneController.GetRecognitionRecordDetail | 获取识别记录详情 | ✅ | | 5 | `/apiv1/get_third_scene_example_image` | GET | SceneController.GetThirdSceneExampleImage | 获取三级场景示例图 | ✅ | | 6 | `/apiv1/submit_evaluation` | POST | SceneController.SubmitEvaluation | 提交点评 | ✅ | | 7 | `/apiv1/get_latest_recognition_record` | GET | SceneController.GetLatestRecognitionRecord | 查询最新识别记录 | ✅ | --- ### 6️⃣ OSS文件存储模块 (4个接口) | 序号 | 路由路径 | 方法 | 控制器方法 | 说明 | 需要认证 | |------|---------|------|-----------|------|---------| | 1 | `/apiv1/oss/upload` | POST | ShudaoOssController.Upload | 生成S3预签名上传凭证 | ✅ | | 2 | `/apiv1/oss/shudao/upload_image` | POST | ShudaoOssController.UploadImage | 上传图片 | ✅ | | 3 | `/apiv1/oss/shudao/upload_json` | POST | ShudaoOssController.UploadPPTJson | 上传PPT JSON文件 | ✅ | | 4 | `/apiv1/oss/parse` | GET | ShudaoOssController.ParseOSS | OSS代理解析接口 | ✅ | --- ### 7️⃣ 流式接口模块 (2个接口) | 序号 | 路由路径 | 方法 | 控制器方法 | 说明 | 需要认证 | |------|---------|------|-----------|------|---------| | 1 | `/apiv1/stream/chat` | POST | LiushiController.StreamChat | 流式聊天接口 | ✅ | | 2 | `/apiv1/stream/chat-with-db` | POST | LiushiController.StreamChatWithDB | 流式聊天数据库集成接口 | ✅ | --- ### 8️⃣ 知识库检索模块 (1个接口) | 序号 | 路由路径 | 方法 | 控制器方法 | 说明 | 需要认证 | |------|---------|------|-----------|------|---------| | 1 | `/apiv1/knowledge/files/advanced-search` | GET | ChromaController.AdvancedSearch | 知识库文件高级搜索 | ✅ | --- ### 9️⃣ 埋点跟踪模块 (4个接口) | 序号 | 路由路径 | 方法 | 控制器方法 | 说明 | 需要认证 | |------|---------|------|-----------|------|---------| | 1 | `/apiv1/tracking/record` | POST | TrackingController.RecordTracking | 记录埋点 | ✅ | | 2 | `/apiv1/tracking/records` | GET | TrackingController.GetTrackingRecords | 获取埋点记录列表 | ✅ | | 3 | `/apiv1/tracking/api_mapping` | POST | TrackingController.AddApiMapping | 添加接口路径映射 | ✅ | | 4 | `/apiv1/tracking/api_mappings` | GET | TrackingController.GetApiMappings | 获取接口路径映射列表 | ✅ | --- ### 🔟 积分系统模块 (3个接口) | 序号 | 路由路径 | 方法 | 控制器方法 | 说明 | 需要认证 | |------|---------|------|-----------|------|---------| | 1 | `/apiv1/points/balance` | GET | PointsController.GetBalance | 获取用户积分余额 | ✅ | | 2 | `/apiv1/points/consume` | POST | PointsController.ConsumePoints | 消费积分下载文件 | ✅ | | 3 | `/apiv1/points/history` | GET | PointsController.GetConsumptionHistory | 获取消费记录 | ✅ | --- ## 📂 三、控制器文件清单 | 序号 | 文件名 | 控制器名称 | 方法数量 | 说明 | |------|--------|-----------|---------|------| | 1 | `chat.go` | ChatController | 16 | 聊天对话相关功能 | | 2 | `total.go` | TotalController | 9 | 通用功能模块 | | 3 | `exam.go` | ExamController | 1 | 考试相关功能 | | 4 | `prompt.go` | PromptController | 2 | 提示词生成功能 | | 5 | `hazard.go` | HazardController | 2 | 隐患识别功能 | | 6 | `scene.go` | SceneController | 5 | 场景管理功能 | | 7 | `shudaooss.go` | ShudaoOssController | 4 | OSS文件存储 | | 8 | `liushi.go` | LiushiController | 2 | 流式接口 | | 9 | `chroma.go` | ChromaController | 1 | 知识库检索 | | 10 | `tracking.go` | TrackingController | 4 | 埋点跟踪(含2个辅助方法) | | 11 | `points.go` | PointsController | 3 | 积分系统 | | 12 | `local_auth.go` | LocalAuthController | 1 | 本地认证 | | 13 | `frontend.go` | FrontendController | 4 | 前端页面渲染 | | 14 | `AIPPT.go` | AIPPTController | 0 | 空控制器(未使用) | | 15 | `test.go` | TestController | 0 | 内部工具函数(无HTTP接口) | --- ## 🔍 四、接口分类统计 ``` 认证模块: 1个接口 聊天对话模块: 16个接口 通用功能模块: 9个接口 考试模块: 3个接口 隐患识别模块: 7个接口 OSS文件存储模块: 4个接口 流式接口模块: 2个接口 知识库检索模块: 1个接口 埋点跟踪模块: 4个接口 积分系统模块: 3个接口 前端页面路由: 4个页面 ----------------------------------- 总计: 53个HTTP接口 (49个API + 4个页面) ``` --- ## ⚠️ 注意事项 1. **空控制器**: `AIPPTController` 当前为空控制器,未实现任何接口方法 2. **测试工具**: `test.go` 文件中的函数仅用于开发和测试环境,不对外提供HTTP接口 3. **认证要求**: 除本地登录接口外,所有API接口都需要通过JWT认证 4. **路由配置**: 所有路由定义在 `routers/router.go` 文件中 --- ## 📝 备注 - 本清单基于代码静态分析生成,涵盖所有已注册的HTTP接口 - 接口的具体参数、返回值等详细信息需查阅对应的控制器源代码 - 部分接口可能有额外的中间件处理(如认证、日志、限流等) --- **检查完成时间**: 2026年4月3日 **检查人员**: Cline **检查状态**: ✅ 已完成全量检查,无遗漏