fix(web+health): 修复咨询轮询 temp ID 400 + 健康数据统计 500
- ConsultationDetail: 轮询取 lastId 时过滤 temp_ 前缀的乐观消息 ID, 避免将非法 UUID 传给 after_id 参数导致后端 400 - stats_service: count_abnormal_lab_items 和 compute_daily_report_rate 中 SQL 字面量 0 类型为 INT4,与 Rust i64 (INT8) 不匹配, 改为 0::bigint 确保类型兼容
This commit is contained in:
@@ -120,7 +120,8 @@ export default function ConsultationDetail() {
|
||||
pollRef.current = setInterval(async () => {
|
||||
if (!sessionId) return;
|
||||
try {
|
||||
const lastId = messages.length > 0 ? messages[messages.length - 1].id : undefined;
|
||||
const realMsgs = messages.filter((m) => !m.id.startsWith('temp_'));
|
||||
const lastId = realMsgs.length > 0 ? realMsgs[realMsgs.length - 1].id : undefined;
|
||||
const result = await consultationApi.listMessages(sessionId, {
|
||||
page: 1,
|
||||
page_size: 50,
|
||||
|
||||
Reference in New Issue
Block a user