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:
iven
2026-05-15 15:05:53 +08:00
parent 2c567bd772
commit 057d9b5896
4 changed files with 306 additions and 12 deletions

View File

@@ -3,12 +3,8 @@ import Taro from '@tarojs/taro';
/**
* 持久化存储工具 — 小程序版本
*
* 注意:此模块不执行客户端加密
* crypto-js 在微信开发者工具Node.js 环境)中会触发 fd 错误导致卡死,
* 因此敏感数据依赖 HTTPS 传输 + 后端 AES-256-GCM 加密保护。
*
* 导出函数名保留 secure* 前缀以保持调用点兼容,但实际为明文存储。
* 如需启用客户端加密,请使用微信小程序原生 crypto API 或通过后端加解密。
* 敏感数据依赖 HTTPS 传输 + 后端 AES-256-GCM 加密保护
* 导出函数名保留 secure* 前缀以保持调用点兼容,实际为明文存储。
*/
export function secureSet(key: string, value: string): void {