fix(usage): 修复多天统计 NUMERIC→f64 解码失败导致记录清空

- 多天统计从日聚合表 SUM numeric 字段后返回 NUMERIC,代码按 f64 解码失败
- 显式添加 ::DOUBLE PRECISION 类型转换
- 管理员统计加载失败时不再清空已加载的记录列表
This commit is contained in:
mayrain
2026-05-05 17:32:50 +08:00
parent 825c1b496d
commit fd8230121c
2 changed files with 20 additions and 17 deletions

View File

@@ -260,7 +260,10 @@ export function useUsageData(options: UseUsageDataOptions) {
}
stats.value = createDefaultStats()
modelStats.value = []
currentRecords.value = []
if (!isAdminPage.value) {
currentRecords.value = []
totalRecords.value = 0
}
} finally {
if (requestId === loadStatsRequestId) {
isLoadingStats.value = false