Commit Graph

6 Commits

Author SHA1 Message Date
dindang
1524a3215c feat(floor): 优化地板样式数据结构和AI换地板功能
- 添加 FloorOption 结构体字段支持尺寸、描述和变体信息
- 优化 loadFloorOptions 函数,实现按品牌和花色名称去重并附带多尺寸变体
- 区分木材、瓷砖、乙烯基和层压板产品,并分类返回
- 更新室内铺装纹理选项,完善图案描述和名称本地化
- 丰富Floor Options API响应数据,包含尺寸、变体、描述等字段
- 增强AI换地板功能,支持尺寸变体SKU,自动调整物理尺寸比例
- 完善地板替换的AI提示词,增加材质锁定、尺寸说明和纹理一致性要求
- 改进地板识别蒙版生成逻辑,确保精准分割地板区域
- Redis任务状态查询接口增加耗时统计字段,提供更细粒度进度信息
- 更新go.mod依赖,新增redis和gorm相关包支持
2026-07-27 16:11:15 +08:00
dindang
a28c7ba963 Update README with current project structure and features
- Add api/ package, model/response.go, logger, queue docs
- Document environment variables (WORKER_COUNT, LOG_DIR, LOG_LEVEL)
- Add cache strategy and async queue sections
- Update project structure tree
- Add GORM + raw SQL hybrid approach doc

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-16 10:39:55 +08:00
aea51512b2 Merge pull request '代码分层' (#1) from dev into main
Reviewed-on: #1
2026-07-16 02:34:08 +00:00
dindang
01a579ab9c Fix unhandled errors and dead code warnings
- Handle validateContent errors in worker.go
- Handle os.Remove errors in worker.go
- Remove dead CheckContent function from floor_handler.go
- Add comment markers for intentionally ignored errors
- Remove unused result variable

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-16 10:32:30 +08:00
dindang
cb7e595c27 Fix lint warnings and code cleanup
- Remove duplicate calc structs, use model.CalcXxx
- Replace log.Printf with logger in recommend handler
- Remove dead code (unused var, dummy imports)
- Clean up response helpers
- Add api/ package with route registration

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-16 10:29:11 +08:00
dindang
94895cbc22 Initial commit: FloorVisualizer backend
- Go API server with PostgreSQL + Redis
- AI floor replacement (OpenRouter Gemini)
- Product database (10 brands, 3539 products)
- Recommendation engine, calculator, articles
- Redis async queue + worker pool
- Hot product caching, brand view tracking
- JWT auth, favorites, projects
- Docker deployment ready

Co-Authored-By: Claude <noreply@anthropic.com>
2026-07-16 09:47:11 +08:00