This commit is contained in:
2025-04-08 16:53:39 +08:00
parent fde99b1352
commit 7c123ce792

View File

@@ -29,6 +29,7 @@ public class OperateLogService : IOperateLog
var now = DateTime.Now;
var userId = _currentUser.GetIntSubjectId();
var userName = _currentUser.GetName();
var tenantId = _currentUser.GetStringTenantId();
try
{
@@ -40,7 +41,8 @@ public class OperateLogService : IOperateLog
CreateTime = now,
ModifiedTime = now,
CreatedBy = userId,
ModifiedBy = userId
ModifiedBy = userId,
TenantId = tenantId
});
}
catch (Exception e)
@@ -52,7 +54,10 @@ public class OperateLogService : IOperateLog
/// <inheritdoc />
public async Task<Pagination<OperateLogResponse>> GetOperateLogPageAsync(OperateLogPageRequest request)
{
var tenantId = _currentUser.GetStringTenantId();
return await _dbContext.Queryable<OperateLogEntity>()
.Where(x => x.TenantId == tenantId)
.Select(x => new OperateLogResponse
{
Content = x.Content,