Commit Graph

193 Commits

Author SHA1 Message Date
54de243fa1 feat: Refactor user context handling and service methods
- Updated middleware to fetch user and tenant models by ID and set them in context.
- Refactored common service methods to accept userID as a parameter instead of extracting from context.
- Modified content service methods to include userID as a parameter for better clarity and performance.
- Adjusted coupon, creator, notification, order, tenant, user, and wallet services to utilize userID directly.
- Enhanced context key constants for improved readability and maintainability.
2025-12-30 22:49:26 +08:00
619f7a69a7 feat: 强制在控制器层提取context.Context中的数据,服务方法需接受显式参数 2025-12-30 22:18:52 +08:00
e5064db577 refactor: 移除不必要的上下文调用,简化服务方法参数 2025-12-30 22:14:22 +08:00
c8f6cb0b34 feat(auth): 添加401未授权处理,清除token并重定向到登录页面 2025-12-30 22:14:11 +08:00
7a8c5c4427 feat(user): 修改OTP登录验证码为"1234"以增强安全性
feat(main): 添加种子命令以初始化数据库数据
feat(consts): 添加创作者角色常量
feat(profile): 更新用户资料页面以支持从API获取用户信息
feat(library): 实现用户库页面以获取已购内容并显示状态
feat(contents): 更新内容编辑页面以支持文件上传和自动保存
feat(topnavbar): 优化用户头像显示逻辑以支持动态加载
2025-12-30 21:55:48 +08:00
ff22ca1264 feat(storage): 添加默认存储提供者以支持存储功能 2025-12-30 21:18:29 +08:00
cf29a2bf1a feat(auth): implement OTP login flow with toast notifications
feat(content): enhance detail view with dynamic content and comments
feat(order): add polling for payment status in the payment view
feat(user): update dashboard to display wallet and recent orders
feat(user): improve orders view with dynamic order fetching and status mapping
feat(api): create API modules for auth, content, order, user, and common functionalities
refactor(request): implement a centralized request utility for API calls
2025-12-30 21:15:13 +08:00
179b6aa0e2 feat(auth): 重构认证模块,添加登录和检查Token功能,更新路由和数据结构 2025-12-30 18:12:22 +08:00
6d7f4ad1c6 feat(auth): 重构认证模块,添加OTP发送和登录功能 2025-12-30 18:10:24 +08:00
3952d80d30 feat(storage): 更新存储结构以使用新的存储提供者并优化文件上传和下载逻辑 2025-12-30 18:07:58 +08:00
d87eac7d94 feat(middlewares): 添加认证中间件以处理JWT授权 2025-12-30 18:06:16 +08:00
2c633dac0f feat: 添加用户优惠券列表接口及相关数据结构 2025-12-30 17:53:27 +08:00
dbfb08ed37 feat: add coupon support to orders and create user_coupons model
- Added CouponID field to Order model to track used coupons.
- Updated order query generation to include CouponID.
- Introduced UserCoupon model to manage user coupon associations.
- Implemented query methods for UserCoupon to facilitate CRUD operations.
- Updated query context and default query setup to include UserCoupon.
2025-12-30 17:28:21 +08:00
69d750800c feat(llm): update 2025-12-30 17:20:07 +08:00
b969218208 feat(storage): 实现本地存储功能,包括文件上传和下载接口 2025-12-30 17:14:03 +08:00
452cdc3f4f feat(llm): update 2025-12-30 15:37:50 +08:00
ee1acae3ed feat: 实现平台抽成、提现审批、异步任务集成及安全审计功能 2025-12-30 14:54:19 +08:00
5e8dbec806 feat(llm): update 2025-12-30 14:52:58 +08:00
7bd36f7cc5 feat(llm): update 2025-12-30 14:50:59 +08:00
f0e3ede69b feat(llm): update 2025-12-30 14:43:26 +08:00
5cf2295f91 feat: Implement notification service and integrate with user interactions
- Added notification service to handle sending and listing notifications.
- Integrated notification sending on user follow and order payment events.
- Updated user service to include fetching followed tenants.
- Enhanced content service to manage access control for content assets.
- Implemented logic for listing content topics based on genre.
- Updated creator service to manage content updates and pricing.
- Improved order service to include detailed order information and notifications.
- Added tests for notification CRUD operations and order details.
2025-12-30 09:57:12 +08:00
9ef9642965 feat: 重构内容服务,优化数据预加载和用户互动功能;增加租户关注功能及相关测试用例 2025-12-30 09:17:13 +08:00
33e1921e17 Refactor super module: Move HTTP handlers to new super/v1 package
- Deleted old super.go file and moved all related HTTP handlers to new package structure under backend/app/http/super/v1.
- Updated service imports in super.go and super_test.go to reflect new DTO paths.
- Created new auth, contents, orders, tenants, and users handlers with corresponding routes and methods.
- Added new DTO definitions for authentication and content management in the super/v1/dto directory.
- Implemented new migration for content_access table and created model for it.
2025-12-29 17:17:07 +08:00
bdf20fb0c6 feat: 更新路由参数约定,要求数字ID路径参数在@Router注解中显式声明类型以确保正确匹配 2025-12-29 15:44:25 +08:00
9d598e7f9b feat: 重构内容和订单列表接口,使用过滤器结构体简化参数传递;更新相关服务和测试用例 2025-12-29 15:41:48 +08:00
fba77afec1 feat: 重构内容列表接口,使用过滤器结构体简化参数传递;更新相关服务和测试用例 2025-12-29 15:04:55 +08:00
8c4bc55f45 feat: update app errors 2025-12-29 14:54:05 +08:00
8fa3d18a9c Refactor order and tenant ledger models to use consts for Currency and Type fields; add new UserStatus values; implement comprehensive test cases for content, creator, order, super, and wallet services. 2025-12-29 14:21:20 +08:00
d648a1e45b feat: 更新用户、订单、媒体资产和租户模型,添加新的字段类型和结构体 2025-12-29 12:01:22 +08:00
0d0aee87b1 feat(llm): update 2025-12-29 12:01:08 +08:00
b78f1e1c84 feat(user): implement OTP login, user creation, and profile management
- Added SendOTP method for simulating OTP sending.
- Implemented LoginWithOTP method for user login/registration via OTP, including user creation if not found.
- Added Me method to retrieve current user information.
- Implemented Update method for updating user profile details.
- Added RealName method for real-name verification.
- Implemented GetNotifications method to fetch user notifications.
- Created user_test.go for comprehensive unit tests covering login, profile retrieval, updates, real-name verification, and notifications.
- Updated database models to use appropriate consts for fields like gender, status, and roles.
2025-12-29 10:55:13 +08:00
bc2064639f feat(llm): update 2025-12-29 10:54:43 +08:00
93a51a376c feat(llm): 更新开发规则,添加关于DTO和分页响应的JSON标签要求 2025-12-29 10:25:35 +08:00
60ff49d4c8 feat: 统一字段命名风格,使用下划线格式替代驼峰式命名 2025-12-29 10:20:53 +08:00
d482905157 feat: 更新内容相关接口,使用统一的分页响应结构 2025-12-29 10:14:47 +08:00
62262bbac2 feat: 更新数据库迁移脚本,添加用户、租户及内容相关表的详细注释 2025-12-29 09:56:37 +08:00
ad52371028 feat: implement new structure 2025-12-29 09:30:49 +08:00
503b15aab7 reset backend 2025-12-27 19:49:11 +08:00
77ac9d00b3 feat(creator): 优化管理概览和频道设置视图,提升用户体验和界面美观 2025-12-26 23:23:31 +08:00
7d11378436 feat(creator): 添加提现功能和账户设置,优化管理概览视图 2025-12-26 23:10:57 +08:00
107a95e57a feat(auth): 优化登录视图,调整手机号和验证码输入框样式,提升用户体验 2025-12-26 22:43:27 +08:00
4ba5f9e951 refactor: 调整通知视图的样式,优化标签和内容的排版,提升可读性 2025-12-26 22:30:11 +08:00
a6e737fdaf feat(portal): 更新主题视图,增加精选专题展示和响应式布局 2025-12-26 22:15:28 +08:00
83f725c0b2 feat(portal): 重构探索视图,增加筛选、排序和搜索功能,优化内容展示 2025-12-26 22:00:41 +08:00
29d35b3106 fix: 修复订单视图中的下拉选项错误,优化设置视图的布局和样式 2025-12-26 21:49:14 +08:00
d4716b979f feat(portal): add favorites and likes views; update user layout with new navigation links 2025-12-26 21:45:15 +08:00
7f8df6dad1 refactor: enhance HomeView layout and styling; improve PaymentView with new payment methods and QR code handling; clean up SecurityView by removing unused sections 2025-12-26 21:39:39 +08:00
d7ea411f25 feat(portal): redesign tenant home view with enhanced layout and interactive features 2025-12-26 19:24:40 +08:00
35b46386c7 feat(portal): enhance creator dashboard and order management with new layout and features 2025-12-26 19:10:40 +08:00
b40c529cd8 feat(portal): implement structural content detail page with opera specific features and paywall 2025-12-26 19:08:51 +08:00