feat(db+test): 菜单权限关联迁移 + 适配 create_message 签名变更
Some checks failed
CI / rust-check (push) Has been cancelled
CI / rust-test (push) Has been cancelled
CI / frontend-build (push) Has been cancelled
CI / security-audit (push) Has been cancelled

- 新增迁移 m097:为 17 个已有菜单设置 permission 字段,新增透析管理/资讯管理 2 个菜单
- 修复 consultation/pii_encryption 测试适配 create_message(sender_id, sender_role) 分离参数
This commit is contained in:
iven
2026-04-30 10:37:43 +08:00
parent 13f553590b
commit 32eef5ecf1
4 changed files with 134 additions and 6 deletions

View File

@@ -102,10 +102,9 @@ async fn test_consultation_message_send() {
let msg = consultation_service::create_message(
app.health_state(), app.tenant_id(), Some(app.operator_id()),
app.operator_id(), "doctor".to_string(),
CreateMessageReq {
session_id: session.id,
sender_id: app.operator_id(),
sender_role: "doctor".to_string(),
content_type: Some("text".to_string()),
content: "您好,有什么可以帮您?".to_string(),
},
@@ -132,10 +131,9 @@ async fn test_consultation_message_list() {
for i in 0..3 {
consultation_service::create_message(
app.health_state(), app.tenant_id(), Some(app.operator_id()),
app.operator_id(), "doctor".to_string(),
CreateMessageReq {
session_id: session.id,
sender_id: app.operator_id(),
sender_role: "doctor".to_string(),
content_type: None,
content: format!("消息{}", i + 1),
},

View File

@@ -269,10 +269,10 @@ async fn test_consultation_message_content_encrypted() {
&state,
tenant_id,
Some(sender_id),
sender_id,
"patient".to_string(),
CreateMessageReq {
session_id: session.id,
sender_id,
sender_role: "patient".to_string(),
content_type: Some("text".to_string()),
content: plain_content.to_string(),
},