feat(ccswitch): 添加一键导入和用量查询

This commit is contained in:
Entropy.Xu
2026-05-29 21:39:45 +08:00
parent 0d76a8e478
commit 7ed4b84654
23 changed files with 1720 additions and 48 deletions
@@ -1423,6 +1423,11 @@ impl UsageReadRepository for InMemoryUsageReadRepository {
continue;
}
}
if let Some(api_key_id) = query.api_key_id.as_deref() {
if item.api_key_id.as_deref() != Some(api_key_id) {
continue;
}
}
if item.billing_status != "settled" || item.total_cost_usd <= 0.0 {
continue;
}