feat(P1): 素材列表支持按类型过滤 - 视频库/配音库分类 #561

Merged
auto-approve-bot merged 1 commits from feat/p1-asset-type-filter into develop 2026-07-19 07:40:37 +08:00

1 Commits

Author SHA1 Message Date
CI Bot 97cf565946 feat(P1): 素材列表支持按类型过滤 - 视频库/配音库分类
CI Build & Deploy Pipeline / Build Staging API Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Build Staging Web Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Build Staging Worker Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Deploy Staging (Watchtower auto-deploy) (pull_request) Has been skipped
CI Build & Deploy Pipeline / Build Production API Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Build Production Web Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Build Production Worker Image (pull_request) Has been skipped
CI Build & Deploy Pipeline / Staging E2E Tests (pull_request) Has been skipped
CI Build & Deploy Pipeline / Staging API Integration Tests (pull_request) Has been skipped
CI Build & Deploy Pipeline / Deploy Production (pull_request) Has been skipped
CI Build & Deploy Pipeline / Production Browser E2E (pull_request) Has been skipped
Preview Deploy / Deploy Preview Environment (pull_request) Failing after 15s
AI Code Review / AI Code Review (pull_request) Failing after 38s
CI/CD Pipeline / Check if frontend-only change (pull_request) Successful in 29s
CI/CD Pipeline / Frontend Unit Tests (pull_request) Has been skipped
CI/CD Pipeline / Frontend Lint (pull_request) Successful in 59s
CI/CD Pipeline / Unit Tests (pull_request) Successful in 36s
CI/CD Pipeline / Validate Code Quality And Tests (pull_request) Successful in 2m2s
Auto Approve CI PRs / Auto Approve on CI Green (pull_request) Successful in 2m38s
CI/CD Pipeline / Integration Tests (pull_request) Successful in 1m33s
Auto Merge CI PRs / Auto Merge on CI Green + Approved (pull_request) Successful in 5m14s
Preview Cleanup / Cleanup Preview Environment (pull_request) Successful in 30s
新增/修复:
- Asset domain 增加 file_type property(从 mime_type 推导)
- AssetRepository 新增 find_by_project_and_file_type / count_by_project_and_file_type / count_by_library_and_file_type
- 素材列表接口 kind 过滤全路径覆盖(DB层分页更高效):
  - library_id模式:total改用count查询(之前用len(items)不准)
  - project_id模式:改用DB层file_type查询(之前内存过滤性能差)
  - 跨项目模式:新增kind过滤(之前完全没有)
  - 内存过滤路径:project_id和跨项目增加DB层预过滤+改用file_type判断
- 向后兼容:kind参数已存在,只是之前不完整
2026-07-19 07:32:30 +08:00