fix: 修复审计日志判断当前用户为空的问题

This commit is contained in:
陈淳
2024-01-31 18:16:17 +08:00
parent c50f1ffcb4
commit ff19cb68b9
6 changed files with 110 additions and 7 deletions

View File

@@ -104,7 +104,7 @@ namespace Yi.Framework.SqlSugarCore
}
if (entityInfo.PropertyName.Equals(nameof(IAuditedObject.LastModifierId)))
{
if (CurrentUser != null)
if (CurrentUser.Id != null)
{
entityInfo.SetValue(CurrentUser.Id);
}
@@ -130,7 +130,7 @@ namespace Yi.Framework.SqlSugarCore
}
if (entityInfo.PropertyName.Equals(nameof(IAuditedObject.CreatorId)))
{
if (CurrentUser != null)
if (CurrentUser.Id != null)
{
entityInfo.SetValue(CurrentUser.Id);
}