158 Commits

Author SHA1 Message Date
chenpei
d31a85ce9b feat: 新增功能 - 场景数量父子关系联动 + 用户部门编辑
1. 场景类别数量父子关系联动:
   - 选择店铺后,场景数量只显示该店铺下的数量
   - 修改 /api/scenes API 支持 category 参数
   - 前端动态更新场景数量统计

2. 用户部门编辑功能:
   - 新增 /api/admin/users/update-department API
   - 用户管理页面添加"编辑部门"按钮
   - 支持为用户分配/修改所属部门
   - 部门列表从系统设置的部门管理获取
2025-10-27 15:37:33 +08:00
chenpei
6377ce6d24 feat: Change preview card dimensions from 300x500 to 300x400
- Update card height from 500px to 400px in homepage
- Adjust maxHeight in image processor from 1000px to 800px
- Update all processImage calls to use maxHeight: 800
- Optimized for better display ratio on homepage
2025-10-26 17:45:46 +08:00
chenpei
030fb2af0b fix: Prevent concurrent upload conflicts with unique file names
- Add generateUniqueFileName function using crypto.randomBytes
- Replace Date.now() with timestamp + random hex for all file names
- Ensures unique file names even when multiple users upload simultaneously
- Fixes: temp PSD files, temp preview files, S3 preview files, and material files
- Resolves reported issue of upload errors with concurrent users
2025-10-26 17:21:39 +08:00
chenpei
0666edc4a8 feat: Update preview image dimensions to 300x500
- Modify PSD processor to crop long images to top 1200px
- Update image processor to support maxHeight parameter (1000px)
- Change homepage card height from 300px to 500px
- Update upload API to use new image processing parameters
- Support vertical/portrait images better with 300x500 display
2025-10-26 16:15:14 +08:00
chenpei
e69f15337d feat: Add automatic PSD preview generation
- Add psd-processor library to auto-generate previews from PSD files
- Update upload API to detect PSD files and generate previews automatically
- Make preview image optional for PSD file uploads
- Update UploadModal UI to show PSD files don't require manual preview upload
- Install ag-psd package for PSD processing
2025-10-26 15:49:33 +08:00
chenpei
d17f6df2c7 feat: 部门管理和文件上传优化
新功能:
1. 部门管理功能
   - 管理员可在系统设置中添加/删除部门
   - 用户注册时从下拉框选择部门
   - 新增Department数据库表和API

2. 文件上传优化
   - 支持直接上传源文件(.max/.psd/.ai/.cad/.dwg/.c4d)
   - 自动识别文件类型并设置素材类型
   - 压缩包需手动选择类型
   - 优化拖拽上传体验

数据库变更:
- 新增departments表
- User表新增department字段
2025-10-26 14:06:19 +08:00
chenpei
3b825883bb feat: 添加多类型素材支持和系统外观设置功能 (v2.4.0)
新增功能:
- 素材类型系统:支持3DMAX/PSD/AI/CAD/C4D/其他等多种类型
- 智能表单:渲染器选项仅在3DMAX类型时显示
- 类型标签:首页卡片显示素材类型标签(橙色)
- 系统外观设置:自定义导航栏颜色、LOGO和网站名称

数据库变更:
- 新增materialType字段到materials表
- 新增materialType索引优化查询
- 新增SystemSettings表存储系统设置

技术改进:
- 完整的TypeScript类型支持
- 前后端完整适配
- 修复Next.js配置弃用警告
- 添加完整的部署文档

文件变更:
- 修改: 上传/编辑组件支持素材类型
- 修改: API接口处理新字段
- 新增: 系统设置管理页面
- 新增: 系统设置API路由
- 新增: 数据库迁移文件
- 更新: 项目文档和部署指南
2025-10-26 09:58:40 +08:00
chenpei
caa3d66c0a Initial commit: 共享平台项目 2025-10-26 09:11:04 +08:00