From a4d09269a41217f45743f2d9755ffd0483cf4aa8 Mon Sep 17 00:00:00 2001 From: iven Date: Wed, 27 May 2026 01:06:16 +0800 Subject: [PATCH] =?UTF-8?q?fix(ai):=20=E5=90=8C=E6=AD=A5=E9=9B=86=E6=88=90?= =?UTF-8?q?=E6=B5=8B=E8=AF=95=20create=5Fprompt=20=E7=AD=BE=E5=90=8D=20?= =?UTF-8?q?=E2=80=94=20=E8=A1=A5=E5=85=85=20analysis=5Ftype=20=E5=8F=82?= =?UTF-8?q?=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Prompt 管理 Phase 2 新增了 analysis_type 参数,但集成测试未同步。 5 处调用点全部补齐第 8 个参数。 --- crates/erp-server/tests/integration/ai_prompt_tests.rs | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/crates/erp-server/tests/integration/ai_prompt_tests.rs b/crates/erp-server/tests/integration/ai_prompt_tests.rs index cceb660..734b627 100644 --- a/crates/erp-server/tests/integration/ai_prompt_tests.rs +++ b/crates/erp-server/tests/integration/ai_prompt_tests.rs @@ -58,6 +58,7 @@ async fn prompt_create_and_get() { "Analyze: {{data}}".into(), serde_json::json!({"model": "claude"}), "analysis".into(), + "lab_report".into(), ) .await .expect("创建应成功"); @@ -91,6 +92,7 @@ async fn prompt_list_with_category_filter() { "usr".into(), serde_json::json!({}), cat.into(), + "lab_report".into(), ) .await .expect("创建应成功"); @@ -128,6 +130,7 @@ async fn prompt_activate_switches_version() { "usr".into(), serde_json::json!({}), "cat".into(), + "lab_report".into(), ) .await .expect("v1"); @@ -187,6 +190,7 @@ async fn prompt_rollback_equals_activate() { "usr".into(), serde_json::json!({}), "cat".into(), + "lab_report".into(), ) .await .expect("v1"); @@ -236,6 +240,7 @@ async fn prompt_cross_tenant_isolation() { "usr".into(), serde_json::json!({}), "cat".into(), + "lab_report".into(), ) .await .expect("create"); @@ -496,7 +501,7 @@ async fn analysis_list_with_filters() { .await; // 按 patient 筛选 - let (items, total) = svc + let (_items, total) = svc .list_analysis( tenant_id, Some(patient_a), @@ -511,7 +516,7 @@ async fn analysis_list_with_filters() { assert_eq!(total, 2); // 按 type 筛选 - let (items, total) = svc + let (_items, total) = svc .list_analysis( tenant_id, None,