fix(health): 修复咨询统计返回零值 BUG + 清理 secure-storage 过时注释
BUG-CONSULTATION-001: safe_aggregate 包装导致 compute_avg_response_time SQL JOIN 错误时整个统计函数返回零值默认。修复方式: - handler 层移除 safe_aggregate 改为直接 .await? - service 层对 compute_avg_response_time 独立错误处理(warn + None) 同时清理 secure-storage.ts 中关于 crypto-js 的过时注释(已移除)。
This commit is contained in:
@@ -31,11 +31,7 @@ where
|
||||
S: Clone + Send + Sync + 'static,
|
||||
{
|
||||
require_permission(&ctx, "health.consultation.list")?;
|
||||
let result = safe_aggregate(
|
||||
stats_service::get_consultation_statistics(&state, ctx.tenant_id),
|
||||
"咨询统计",
|
||||
)
|
||||
.await;
|
||||
let result = stats_service::get_consultation_statistics(&state, ctx.tenant_id).await?;
|
||||
Ok(Json(ApiResponse::ok(result)))
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user