fix(agent): 医院工具切换至 hospital 集合并补齐支付约束
hospital_info_list/query/set 改为读写 hospital 集合,适配 entityName/nicknames/fudanRank;医院子代理与提示词同步字段口径;health_profile_set 更新启用 schema 校验;escort_record_set 限制线下收款方式,存在未支付流水时禁止改价。
This commit is contained in:
@@ -106,10 +106,11 @@ const healthProfileSetTool = tool(
|
||||
}
|
||||
update["meta.updatetime"] = new Date();
|
||||
|
||||
// 与接口层一致:身高/体重范围、性别枚举等 schema 约束必须在更新时生效
|
||||
const updated = await DBModel.HealthProfile.findByIdAndUpdate(
|
||||
profileId,
|
||||
{ $set: update },
|
||||
{ new: true }
|
||||
{ new: true, runValidators: true }
|
||||
);
|
||||
if (!updated) {
|
||||
return { success: false, error: `未找到 ID 为 ${profileId} 的健康档案` };
|
||||
|
||||
Reference in New Issue
Block a user