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
Owner

改动内容

  • Asset domain新增file_type property(从mime_type推导,返回video/voice/image/other)
  • AssetRepository新增3个DB层查询方法:find_by_project_and_file_type / count_by_project_and_file_type / count_by_library_and_file_type
  • 素材列表接口kind参数过滤全路径补全:library_id / project_id / 跨项目模式均支持
  • library_id模式total改用count查询(原len(items)不准)
  • project_id和跨项目模式改用DB层预过滤(原内存过滤性能差)

影响范围

  • 素材列表接口按类型过滤准确生效
  • 视频库只返视频、配音库只返配音
## 改动内容 - Asset domain新增`file_type` property(从mime_type推导,返回video/voice/image/other) - AssetRepository新增3个DB层查询方法:find_by_project_and_file_type / count_by_project_and_file_type / count_by_library_and_file_type - 素材列表接口`kind`参数过滤全路径补全:library_id / project_id / 跨项目模式均支持 - library_id模式total改用count查询(原len(items)不准) - project_id和跨项目模式改用DB层预过滤(原内存过滤性能差) ## 影响范围 - 素材列表接口按类型过滤准确生效 - 视频库只返视频、配音库只返配音
xiaoxia added the backendP1feature labels 2026-07-19 07:35:05 +08:00
xiaoxia added 1 commit 2026-07-19 07:35:06 +08:00
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
97cf565946
新增/修复:
- 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参数已存在,只是之前不完整
auto-approve-bot approved these changes 2026-07-19 07:37:59 +08:00
auto-approve-bot left a comment
Collaborator

CI全绿,自动审批通过。

CI全绿,自动审批通过。
auto-approve-bot approved these changes 2026-07-19 07:37:59 +08:00
auto-approve-bot left a comment
Collaborator

CI全绿,自动审批通过。

CI全绿,自动审批通过。
auto-approve-bot merged commit 9afd4060d1 into develop 2026-07-19 07:40:37 +08:00
auto-approve-bot deleted branch feat/p1-asset-type-filter 2026-07-19 07:40:37 +08:00

🗑️ 预览环境已清理

PR #561 已关闭或合并,对应的预览环境已被清理。

如有需要,可以重新打开 PR 来重新生成预览环境。

🗑️ **预览环境已清理** PR #561 已关闭或合并,对应的预览环境已被清理。 > 如有需要,可以重新打开 PR 来重新生成预览环境。
Sign in to join this conversation.