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 }); } + } }