fix(health): 精准审计修复 6 个真实问题 — 安全/一致性/性能
P0: consultation handler sender_role 从请求体移除,改为服务端推导(防伪造) P1: 所有软删除操作统一使用 check_version 乐观锁(6个函数) P1: 修复 health_trend 索引缺少 tenant_id 前导列 + follow_up_record 补 (tenant_id, executed_date) 索引 P2: Decimal->f64 使用 ToPrimitive::to_f64 替代脆弱的 to_string().parse() P2: 预约取消释放槽位+状态更新包裹进同一事务
This commit is contained in:
@@ -35,7 +35,6 @@ pub struct CloseSessionReq {
|
||||
#[derive(Debug, serde::Deserialize, utoipa::ToSchema)]
|
||||
pub struct CreateConsultationMessageReq {
|
||||
pub session_id: Uuid,
|
||||
pub sender_role: String,
|
||||
pub content_type: Option<String>,
|
||||
pub content: String,
|
||||
}
|
||||
@@ -135,7 +134,7 @@ where
|
||||
let msg_req = CreateMessageReq {
|
||||
session_id: req.session_id,
|
||||
sender_id: ctx.user_id,
|
||||
sender_role: req.sender_role,
|
||||
sender_role: "doctor".to_string(),
|
||||
content_type: req.content_type,
|
||||
content: req.content,
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user