小鱼开发
c6eba97b43
feat(points): 积分消耗系统全链路集成
...
后端:
- 简化积分服务: 删除 freeze/settle/refund, 保留 consume/recharge/expire
- 计费配置化: config/points-config.yaml 驱动 fixed/duration/free 三种模式
- TTS 时长探测: app/utils/audio_utils.py (httpx + mutagen 纯 Python)
- Python 层扣费: script(5)/polish(1)/title(1)/voice_clone(200)/tts(按秒)/video(按秒)
- 字幕 free_services: caption/auto_align 不扣费
- 新增 POST /points/consume 端点(402余额预检)
- 新增 check_balance + /points/cost 返回 sufficient/balance/required
- 新增 expire_batches 定时回收, 接入 scheduler main(每5分钟)
- 删除废弃 tts_handler.py
- Alembic 迁移: 删除 frozen/total_refunded 字段
- 同步 requirements.lock 添加 mutagen
前端:
- Rust/IPC 层扣费: compose(5)/subtitle_burn(2)/cover_design(2)
- 字幕打轴改异步: 走 scheduler subtitle handler
- 对口型传 duration: VideoGeneration 传 actualDuration
- 创建 pointStore: 全局余额 + fetchBalance + 充值弹窗控制
- 402 欠费弹 RechargeModal: VideoGeneration/SubtitleBurning/CoverDesign
- 修复 VoiceDubbing.tsx 类型错误 (alignResult never)
- 同步 PointBalance 类型(删除 frozen/available/totalRefunded)
Refs: 积分消耗集成收尾
2026-05-09 15:42:54 +08:00
小鱼开发
eeb5b0bd47
chore: 升级 FastAPI 0.135.3 → 0.136.1
...
同时更新 requirements.lock 中相关依赖:
- starlette 1.0.0
- urllib3 2.7.0
- volcengine-python-sdk 5.0.25 → 5.0.26
注:auth.py 中 Request 参数保持 Request = None 写法,
因为 FastAPI 不支持 Request | None 作为注入参数类型注解
(FastAPI 用 lenient_issubclass 检查,Union 类型无法通过)。
2026-05-08 12:10:29 +08:00
小鱼开发
b597d715c8
fix: 认证流程修复 + alembic 迁移补全 + 前端僵尸代码清理
...
后端:
- 修复 get_current_user 未校验 is_active,被封禁用户仍可用旧 Token
- auth.py 捕获 ValueError 转 HTTPException(验证码错误、账号被封、Token 无效等不再返回 500)
- 修正 SMS 每日上限注释(3次 → 10次)
- 修复迁移脚本外键引用错误:users.id → mjk_users.id
- 新建积分系统 4 张表的迁移(mjk_user_points/batches/transactions/recharge_orders)
- pyproject.toml 补充 alembic + psycopg2-binary 依赖
- ruff 格式修复(import 排序等)
前端:
- 修复 doRefreshToken 成功后不持久化新 Token 的严重 bug
- 修复应用重启后 SSE 不自动重连(收不到踢人通知)
- 修复 App.tsx handleLogout 未 await
- client.ts 统一从 utils/env 导入 isTauri,默认 base URL 兜底 localhost:8000
- 清理 ~20 个未使用的 hooks/utils/api 模块/组件导出
- 修复所有 ESLint 警告(206 → 0)和 TSC 错误
- 测试通过(5/5)
其他:
- 更新 requirements.lock 和 uv.lock
2026-05-08 11:10:48 +08:00
小鱼开发
ab9962d333
refactor(vidu): reusable session, semaphore, retry, lifespan management
...
- vidu_provider: single ClientSession with TCP connector pool and explicit timeouts
- vidu_service: Semaphore(10) concurrency limit + tenacity retry (3 attempts, exponential backoff)
- voice/vidu routes: use FastAPI Depends injection instead of new Service() per request
- main.py: initialize Vidu Provider & Service in lifespan, close on shutdown
- add tenacity to dependencies
- remove vidu_tts_service.py
2026-05-02 21:55:20 +08:00
小鱼开发
74983ce5ec
feat: init meijiaka-zj project from ai-meijiaka template
2026-04-20 16:39:57 +08:00