修改日志
continuous-integration/drone/push Build is passing
Details
continuous-integration/drone/push Build is passing
Details
parent
e0779ab295
commit
6b9feca865
|
@ -17,6 +17,7 @@ namespace IRaCIS.Core.Application.ViewModel
|
||||||
|
|
||||||
public string? ActionUserName { get; set; }
|
public string? ActionUserName { get; set; }
|
||||||
|
|
||||||
|
public string ActionUserRoleShortName { get; set; }
|
||||||
|
|
||||||
public DateTime CreateTime { get; set; }
|
public DateTime CreateTime { get; set; }
|
||||||
public Guid CreateUserId { get; set; }
|
public Guid CreateUserId { get; set; }
|
||||||
|
|
|
@ -1130,7 +1130,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
IsZhiZhun = t.IdentityUser.IsZhiZhun,
|
IsZhiZhun = t.IdentityUser.IsZhiZhun,
|
||||||
FullName = t.IdentityUser.FullName,
|
FullName = t.IdentityUser.FullName,
|
||||||
PermissionStr = t.UserTypeRole.PermissionStr,
|
PermissionStr = t.UserTypeRole.PermissionStr,
|
||||||
UserName = t.UserName,
|
UserName = t.IdentityUser.UserName,
|
||||||
UserTypeShortName = t.UserTypeRole.UserTypeShortName,
|
UserTypeShortName = t.UserTypeRole.UserTypeShortName,
|
||||||
}).FirstOrDefaultAsync();
|
}).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
|
|
@ -123,6 +123,7 @@ namespace IRaCIS.Core.Application.Service
|
||||||
|
|
||||||
|
|
||||||
CreateMap<UserLog, UserLogView>()
|
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));
|
.ForMember(d => d.TargetIdentityUserName, c => c.MapFrom(t => t.TargetIdentityUser.UserName));
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -41,11 +41,20 @@ namespace IRaCIS.Core.Application.Triggers.AfterSaveTrigger
|
||||||
|
|
||||||
}).FirstOrDefaultAsync();
|
}).FirstOrDefaultAsync();
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
userlog.JsonObj = obj.ToJsonStr();
|
userlog.JsonObj = obj.ToJsonStr();
|
||||||
|
|
||||||
await _identityUserRepository.SaveChangesAsync();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
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();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue