Commit Graph

6 Commits

Author SHA1 Message Date
danial
8104165c7c feat: add glass morphism styles and variables for enhanced UI effects
- Introduced new mixins for glass morphism effects in `mixins.module.scss`
- Added corresponding variables for glass effects in `variables.module.scss`
- Created visual effects mixins for dynamic backgrounds and shadows in `visual-effects.module.scss`
- Updated Tailwind CSS configuration to include new content paths
2025-09-09 23:36:25 +08:00
danial
e141a2ba3f Refactor test files for consistency and readability
- Consolidated multi-line statements into single lines for improved readability in `conftest.py`, `test_distributed_lock.py`, `run_tests.py`, `test_all_apis.py`, `test_gift_card_api.py`, `test_user_data_api.py`, `unit/test_gift_card_api.py`, `unit/test_links_api.py`, `unit/test_opentelemetry.py`, `unit/test_orders_api.py`, and `unit/test_user_data_api.py`.
- Updated import statements to reflect changes in service names and paths in `test_distributed_lock.py` and `test_opentelemetry.py`.
- Enhanced test descriptions and assertions for clarity in various test files.
- Ensured consistent formatting of dictionaries and lists across test files.
2025-09-08 19:57:10 +08:00
danial
51ca5d50d6 refactor(api): update type hints to use Python 3.10+ syntax
Replace Optional[T] with T | None and update response models to match database fields. Also standardize API endpoints and improve error handling.
2025-09-07 17:49:58 +08:00
danial
a23b48ac81 refactor(redis): 将Redis客户端改为异步获取并移除降级客户端
- Redis客户端获取函数统一异步接口,确保返回真实Redis客户端或抛出异常
- 移除内存模式降级客户端及相关同步接口,简化缓存逻辑
- 修改所有调用Redis的代码,改用await获取异步Redis客户端
- 更新分布式锁及状态管理相关处,调用Redis操作均异步执行等待结果
- DatabaseManager 添加获取异步引擎方法,清理同步引擎相关代码
- main.py 中添加数据库表创建调用,确保启动时创建表结构
- 引入新的分页响应模型,并在基础仓库返回分页数据时使用该模型
- 优化部分异常处理,使用logger.error替代warning以统一错误级别
- 移除redis_client冗余声明,避免重复赋值与潜在竞态问题
2025-09-04 17:29:31 +08:00
danial
a71167828a refactor(repository): 优化仓储层类型注解及方法实现
- 统一使用 ModelType 作为泛型类型变量名,提升代码可读性
- 使用 match-case 语法简化条件判断,增强代码简洁性
- 优化批量更新、分页计算及过滤条件处理逻辑
- 清理多余变量赋值,直接返回查询结果,减少冗余代码
- UserDataRepository 增加查找或创建用户方法,支持邮箱和手机号优先查找
- LinkRepository、GiftCardRepository、OrderRepository、UserDataRepository 方法统一返回类型并精简代码
- HealthService 替换同步 Redis 客户端为异步,完善降级客户端判断
- LinkService 移除异步 Redis 调用,统一同步访问,并修正池位置更新方式
- PlaywrightService 修正订单链接访问路径,避免空引用异常
- UserDataService 优化用户数据上传、更新、删除及查询功能
- Celery 任务访问方式调整,避免循环依赖
- 格式调整,统一参数处理及字典创建风格,确保尾部逗号和换行规范
2025-09-02 17:37:01 +08:00
danial
43766f653b feat: implement gift card processing system
Add API endpoints and services for handling gift card information submission and status tracking during Apple gift card redemption process. Includes documentation and tests.
2025-08-27 17:18:07 +08:00