122 Commits

Author SHA1 Message Date
9f51ac602e 实现内存缓存机制,优化数据库查询性能
- 新增内存缓存接口和实现,支持设置过期时间
- 在数据库初始化时创建全局缓存实例
- 为模型类型、提供商和价格查询添加缓存层
- 实现定期缓存常用数据的后台任务
- 优化数据库查询,减少重复查询和不必要的数据库访问
- 为价格查询添加索引,提高查询效率
2025-03-07 00:28:36 +08:00
449f95d1b5 重构价格管理模块,完全迁移到 GORM ORM
- 将价格相关处理函数从原生 SQL 完全迁移到 GORM
- 优化数据库查询逻辑,使用 GORM 的链式查询和更新方法
- 重构价格审核、更新和批量审核功能,使用事务处理
- 简化数据库操作,移除手动 SQL 查询和扫描逻辑
- 优化价格倍率计算方法,提高代码可读性和性能
2025-03-06 23:46:18 +08:00
31f65a9301 优化用户模型 Email 字段长度限制
- 为 Email 字段添加 varchar(191) 类型约束
- 确保数据库兼容性和索引性能
2025-03-06 23:37:14 +08:00
aeb05f790a 重构数据库层并迁移到 GORM
- 将数据库操作从原生 SQL 迁移到 GORM ORM
- 更新模型定义,添加 GORM 标签和关系
- 移除手动创建表的 SQL 方法,改用 AutoMigrate
- 更新所有数据库相关处理逻辑以适配 GORM
- 升级 Go 版本和依赖库
- 移除数据库和路由中间件,简化项目结构
2025-03-06 23:32:18 +08:00
0bdadcfef7 新增模型类型管理功能
- 后端添加模型类型的增删改查接口,并增加管理员权限控制
- 扩展模型类型模型,新增排序字段
- 前端新增模型类型管理页面入口和路由
- 优化模型类型查询,支持按排序字段排序
- 在创建和更新价格时增加模型重复性检查
2025-03-06 23:16:18 +08:00
da79bf3d6d 新增批量审核价格功能并优化前端交互
- 后端新增 `/prices/approve-all` 接口,支持管理员一键通过所有待审核价格
- 前端价格管理页面添加"全部通过"按钮,仅对管理员可见
- 优化批量添加价格页面交互,增加行复制和删除按钮
- 调整价格输入为可为空,移除默认值为0的限制
2025-03-06 22:43:30 +08:00
e7e93dc2ad 优化OAuth认证处理逻辑并增加调试日志
- 固定OAuth授权、令牌和用户信息URL
- 更新用户信息结构体以匹配新的API响应
- 添加调试日志输出用户信息和角色分配
- 修正用户ID类型为整型
- 优化管理员角色判断逻辑
2025-03-03 23:33:15 +08:00
af82111ae3 修复用户信息结构体中的头像字段名称并更新角色判断逻辑 2025-03-03 23:17:47 +08:00
4cc3387e97 Remove development-mode test login functionality
- Strip out hardcoded test user creation and session generation
- Prepare for OAuth 2.0 authentication in production environment
- Simplify login handler to focus on OAuth authentication
2025-02-23 04:55:56 +08:00
cc55be5ac8 Enhance Prices view with robust NULL value handling and minor onMounted optimization
- Add NULL check for temporary fields to prevent unnecessary tag rendering
- Update model type loading to use correct key and label fields
- Simplify onMounted method to remove unnecessary async/await
2025-02-23 04:54:43 +08:00
b0d0bee061 test 2025-02-23 04:23:57 +08:00
315933d57a Refactor model type handling and add SQLite support
- Update config to include SQLite path for database migration
- Modify model type handlers to use new database schema
- Update frontend to handle new model type key and label fields
- Add database migration script to start process
- Import SQLite driver for potential database usage
2025-02-23 04:23:42 +08:00
9cd5674876 删除多余 2025-02-23 04:09:01 +08:00
330963418e Remove SQLite migration and related code 2025-02-23 04:03:20 +08:00
c9a9e7b845 Update Price model and migration to use unsigned integer for channel_type 2025-02-23 03:42:38 +08:00
a2932ecf6b Migrate from SQLite to MySQL: Update database configuration and schema 2025-02-23 03:37:10 +08:00
8d198e45af 恢复 2025-02-23 03:17:34 +08:00
09edd1f271 修复: 提交模型表单类型 2025-02-22 02:10:04 +08:00
7d036959e2 修复: 前端提交模型厂商ID信息, 改为数字类型, 与后端匹配 2025-02-22 01:47:17 +08:00
67639f94ed Refactor Prices view action buttons with improved UX and icon-based interactions 2025-02-21 12:29:11 +08:00
2efb33fc2f Enhance provider management and price filtering with model type and ID handling 2025-02-21 12:07:56 +08:00
15a7c75145 Add getModelType function to support model type display in Prices view 2025-02-21 11:58:04 +08:00
6fa37f6d6a Add model type support for pricing management 2025-02-21 11:51:53 +08:00
d4aebb8148 更新 OAuth 相关 URL 以使用新域名,并修改前端链接 2025-02-14 23:59:28 +08:00
40feab37f6 Improve Prices view dialog layout and responsiveness 2025-02-09 19:34:53 +08:00
50d63f47c7 Add channel type filtering to Prices view and backend API 2025-02-09 19:24:10 +08:00
e852b885c0 Implement pagination and loading states for Prices and Providers views 2025-02-09 18:56:56 +08:00
b5faf07c6c Adjust Prices view table column width 2025-02-08 21:51:35 +08:00
c1e63cea5b Refactor Prices view import and table display logic 2025-02-08 21:43:59 +08:00
6d114d57a6 Update footer and home page with Q58 community link 2025-02-08 21:36:17 +08:00
e31e35c0b5 Update Vite proxy to use local development server 2025-02-08 21:30:48 +08:00
7b884cd3ee Enhance Prices view with admin batch actions and UI improvements 2025-02-08 21:30:28 +08:00
1d16333e11 Replace "supplier" terminology with "model vendor" across frontend and backend 2025-02-08 21:03:01 +08:00
7873fab16f Add batch price submission and improve UI for price list view 2025-02-08 20:54:51 +08:00
e7967dfeff Modify login flow to support dynamic OAuth 2.0 authorization URL 2025-02-08 20:21:39 +08:00
bd8656542b Migrate authentication from Discourse SSO to OAuth 2.0 authentication flow 2025-02-08 20:07:42 +08:00
8a2aec1ca3 Update authentication cookie settings for domain-specific SSO and redirect 2025-02-08 19:09:17 +08:00
d1f3b5b989 Fix SSO callback URL to use hardcoded HTTPS domain 2025-02-08 18:53:11 +08:00
5c9bb1b2a2 Add multi-arch support and optimize Nginx configuration for improved performance and compatibility 2025-02-08 18:47:21 +08:00
4c48a50aca Simplify Dockerfile to single-stage build and optimize deployment configuration 2025-02-08 18:42:08 +08:00
afe0d5fc11 Optimize Dockerfile and deployment workflow with multi-stage build and server auto-deployment 2025-02-08 18:35:55 +08:00
85f21a3105 Simplify Dockerfile and GitHub Actions workflow for single-stage Docker build 2025-02-08 17:36:33 +08:00
7487aaadda Remove Deno-specific configuration files and migrate to Cloudflare Workers environment 2025-02-08 17:32:58 +08:00
0012d45205 Enhance price review and table rendering with improved data handling and error management 2025-02-08 02:29:14 +08:00
1e2cbbbcdf Update price table body element ID and simplify price loading function 2025-02-08 02:25:31 +08:00
974b5d581f Refactor price loading and initialization with async/await and improved error handling 2025-02-08 02:23:59 +08:00
97e5605991 Enhance CORS and fetch configuration with more secure and flexible settings 2025-02-08 02:21:49 +08:00
fa9ac6789d Improve price table rendering with robust error handling and logging 2025-02-08 02:19:25 +08:00
fe48d1af9e Refactor frontend and backend price data loading with improved error handling and logging 2025-02-08 02:16:44 +08:00
d66cd06938 Add API URL display and copy functionality to frontend 2025-02-08 02:14:11 +08:00