From 1d2ef4561f9c052444842fa720eb4082401f756f Mon Sep 17 00:00:00 2001 From: hang <872297557@qq.com> Date: Thu, 24 Apr 2025 09:42:44 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=B4=A6=E5=8F=B7=E4=BF=A1?= =?UTF-8?q?=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Triggers/BeforeSaveTrigger/UserLogTrigger.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/IRaCIS.Core.Application/Triggers/BeforeSaveTrigger/UserLogTrigger.cs b/IRaCIS.Core.Application/Triggers/BeforeSaveTrigger/UserLogTrigger.cs index ccb21566a..65a99963f 100644 --- a/IRaCIS.Core.Application/Triggers/BeforeSaveTrigger/UserLogTrigger.cs +++ b/IRaCIS.Core.Application/Triggers/BeforeSaveTrigger/UserLogTrigger.cs @@ -85,6 +85,11 @@ namespace IRaCIS.Core.Application.Triggers await _userReposiotry.BatchUpdateNoTrackingAsync(t => t.EMail == user.EMail, u => new User() { Phone = user.Phone }); } + if (beforeUser.Sex != user.Sex) + { + await _userReposiotry.BatchUpdateNoTrackingAsync(t => t.EMail == user.EMail, u => new User() { Sex = user.Sex }); + } + if (beforeUser.IsZhiZhun != user.IsZhiZhun) { await _userReposiotry.BatchUpdateNoTrackingAsync(t => t.EMail == user.EMail, u => new User() { IsZhiZhun = user.IsZhiZhun,OrganizationName=user.OrganizationName }); @@ -94,6 +99,7 @@ namespace IRaCIS.Core.Application.Triggers { await _userReposiotry.BatchUpdateNoTrackingAsync(t => t.EMail == user.EMail, u => new User() { DepartmentName = user.DepartmentName, PositionName = user.PositionName }); } + } }