Merge branch 'Test_HIR_Net8' of https://gitea.frp.extimaging.com/XCKJ/irc-netcore-api into Test_HIR_Net8
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
commit
8a241754ca
|
@ -80,8 +80,13 @@ namespace IRaCIS.Core.API
|
|||
triggerOptions.AddTrigger<UserLogTrigger>();
|
||||
|
||||
triggerOptions.AddTrigger<UserAddTrigger>();
|
||||
|
||||
triggerOptions.AddTrigger<UserModifyTrigger>();
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -58,6 +58,13 @@ namespace IRaCIS.Core.Application.Triggers
|
|||
|
||||
await _userReposiotry.BatchUpdateNoTrackingAsync(t => t.EMail == user.EMail, u => new User() { IsFirstAdd = true });
|
||||
}
|
||||
|
||||
//只用初始化其中一个
|
||||
if (beforeUser.IsFirstAdd == true && user.IsFirstAdd == false)
|
||||
{
|
||||
|
||||
await _userReposiotry.BatchUpdateNoTrackingAsync(t => t.EMail == user.EMail, u => new User() { IsFirstAdd = false });
|
||||
}
|
||||
|
||||
if (beforeUser.Password != user.Password)
|
||||
{
|
||||
|
@ -67,13 +74,44 @@ namespace IRaCIS.Core.Application.Triggers
|
|||
|
||||
if (beforeUser.EMail != user.EMail)
|
||||
{
|
||||
await _userReposiotry.BatchUpdateNoTrackingAsync(t => t.EMail == user.EMail, u => new User() { EMail = user.EMail });
|
||||
await _userReposiotry.BatchUpdateNoTrackingAsync(t => t.EMail == beforeUser.EMail, u => new User() { EMail = user.EMail });
|
||||
}
|
||||
|
||||
if (beforeUser.CheckCode != user.CheckCode)
|
||||
{
|
||||
await _userReposiotry.BatchUpdateNoTrackingAsync(t => t.EMail == user.EMail, u => new User() { CheckCode = user.CheckCode });
|
||||
}
|
||||
|
||||
if (beforeUser.FirstName != user.FirstName || beforeUser.LastName != user.LastName)
|
||||
{
|
||||
await _userReposiotry.BatchUpdateNoTrackingAsync(t => t.EMail == user.EMail, u => new User() { FirstName = user.FirstName, LastName = user.LastName });
|
||||
}
|
||||
|
||||
if (beforeUser.Phone != user.Phone)
|
||||
{
|
||||
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 });
|
||||
}
|
||||
|
||||
if (beforeUser.OrganizationName != user.OrganizationName)
|
||||
{
|
||||
await _userReposiotry.BatchUpdateNoTrackingAsync(t => t.EMail == user.EMail, u => new User() { OrganizationName = user.OrganizationName });
|
||||
}
|
||||
|
||||
if (beforeUser.DepartmentName != user.DepartmentName || beforeUser.PositionName != user.PositionName)
|
||||
{
|
||||
await _userReposiotry.BatchUpdateNoTrackingAsync(t => t.EMail == user.EMail, u => new User() { DepartmentName = user.DepartmentName, PositionName = user.PositionName });
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue