first build nexus

This commit is contained in:
billyshen
2026-03-23 20:57:45 +08:00
parent acb58c5684
commit e312026141
400 changed files with 52448 additions and 0 deletions

View File

@@ -0,0 +1,49 @@
# 2026-03-23 工作日志
## 日期2026-03-23
## 星期:日
## 今日工作
### 1. 代码提交流程规范
- **问题**: 习惯性自动 commit/push违反用户审核流程
- **解决**: 添加铁律 - 未经用户确认禁止 commit 和 push
- **重要**: 两次违反规则后改正
### 2. 联系人字段保存(需求分析)
- 修改 Requirement 模型和序列化器,添加 contact_email 字段
- 修改 StructuredDataSerializer、RequirementWebhookSerializer 添加 contact_name/phone/email
- 确保 n8n 返回的联系人数据正确保存到数据库
### 3. 行程优化 webhook
- 尝试添加轮询逻辑(后回滚,方案不满意)
- 优化 admin/views.py 返回 webhook callback 的 message
- 修改 settings.py 添加 apps.admin logger
### 4. 代码重构
- 将 N8nIntegrationService.send_to_n8n 移到 RequirementService
- 超时配置改为读取 settings.WEBHOOK_TIMEOUT
### 5. Bug 修复
- optimize_itinerary 和 quote_itinerary 的 timeout 默认值从 30 改为 120
- 统一使用 settings 配置
### 6. 模板重构
- 将 requirement.py 中的 JS 代码提取到独立模板 templates/admin/requirement_change_form.html
---
## Git 提交记录
| Commit | 描述 |
|--------|------|
| f12b7d6 | fix(admin): 修复 webhook timeout 默认值统一为 120秒 |
| 3be5ef4 | refactor(admin): 重构需求详情页按钮逻辑 |
---
## 经验教训
1. **Git 流程**: 必须等用户审核后再 commit/push
2. **N8n 数据流**: 确认数据来源是顶层还是 structured_data
3. **Django Settings**: 使用 getattr 读取配置,设置合理的默认值