修改日志
continuous-integration/drone/push Build is passing Details

Uat_IRC_Net8
hang 2024-12-26 16:48:20 +08:00
parent e0779ab295
commit 6b9feca865
4 changed files with 14 additions and 3 deletions

View File

@ -17,6 +17,7 @@ namespace IRaCIS.Core.Application.ViewModel
public string? ActionUserName { get; set; }
public string ActionUserRoleShortName { get; set; }
public DateTime CreateTime { get; set; }
public Guid CreateUserId { get; set; }

View File

@ -1130,7 +1130,7 @@ namespace IRaCIS.Core.Application.Service
IsZhiZhun = t.IdentityUser.IsZhiZhun,
FullName = t.IdentityUser.FullName,
PermissionStr = t.UserTypeRole.PermissionStr,
UserName = t.UserName,
UserName = t.IdentityUser.UserName,
UserTypeShortName = t.UserTypeRole.UserTypeShortName,
}).FirstOrDefaultAsync();

View File

@ -123,6 +123,7 @@ namespace IRaCIS.Core.Application.Service
CreateMap<UserLog, UserLogView>()
.ForMember(d => d.ActionUserRoleShortName, c => c.MapFrom(t => t.CreateUserRole.UserTypeRole.UserTypeShortName))
.ForMember(d => d.TargetIdentityUserName, c => c.MapFrom(t => t.TargetIdentityUser.UserName));

View File

@ -41,11 +41,20 @@ namespace IRaCIS.Core.Application.Triggers.AfterSaveTrigger
}).FirstOrDefaultAsync();
userlog.JsonObj = obj.ToJsonStr();
await _identityUserRepository.SaveChangesAsync();
userlog.JsonObj = obj.ToJsonStr();
}
if (userlog.ActionIdentityUserId != null && userlog.ActionUserName.IsNullOrWhiteSpace())
{
userlog.ActionUserName = await _identityUserRepository.Where(t => t.Id == userlog.ActionIdentityUserId).Select(t => t.UserName).FirstOrDefaultAsync();
}
await _identityUserRepository.SaveChangesAsync();
}
}
}