From 213cb6933253314e030ae33fbb476bd09a1769e2 Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Fri, 18 Apr 2025 10:03:35 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=88=87=E6=8D=A2=E5=8C=BB?= =?UTF-8?q?=E9=99=A2bug?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IRaCIS.Core.Application/Service/Visit/PatientService.cs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/IRaCIS.Core.Application/Service/Visit/PatientService.cs b/IRaCIS.Core.Application/Service/Visit/PatientService.cs index 03f2136f2..9b5a22b53 100644 --- a/IRaCIS.Core.Application/Service/Visit/PatientService.cs +++ b/IRaCIS.Core.Application/Service/Visit/PatientService.cs @@ -104,6 +104,11 @@ namespace IRaCIS.Application.Services await _hIRHospitalRepository.BatchUpdateNoTrackingAsync(t => t.Id == hirHospitalId, u => new HIRHospital() { IsDefault = true }); + var hospitalInfo = _hIRHospitalRepository.Where(t => t.IsDefault == true).FirstNotNullAsync(); + + //切换了医院,验证获取医院这里也需要实时变更 + await _fusionCache.SetAsync(CacheKeys.Hospital, hospitalInfo, TimeSpan.FromDays(7)); + return ResponseOutput.Ok(); }