diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/IAuditLogRepository.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/IAuditLogRepository.cs index cd7e22b9a2..31666504d4 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/IAuditLogRepository.cs +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.Domain/Volo/Abp/AuditLogging/IAuditLogRepository.cs @@ -18,6 +18,7 @@ namespace Volo.Abp.AuditLogging DateTime? endTime = null, string httpMethod = null, string url = null, + Guid? userId = null, string userName = null, string applicationName = null, string correlationId = null, @@ -33,6 +34,7 @@ namespace Volo.Abp.AuditLogging DateTime? endTime = null, string httpMethod = null, string url = null, + Guid? userId = null, string userName = null, string applicationName = null, string correlationId = null, diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/EfCoreAuditLogRepository.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/EfCoreAuditLogRepository.cs index 5302ff7106..6b2a440f1f 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/EfCoreAuditLogRepository.cs +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.EntityFrameworkCore/Volo/Abp/AuditLogging/EntityFrameworkCore/EfCoreAuditLogRepository.cs @@ -29,6 +29,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore DateTime? endTime = null, string httpMethod = null, string url = null, + Guid? userId = null, string userName = null, string applicationName = null, string correlationId = null, @@ -44,6 +45,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore endTime, httpMethod, url, + userId, userName, applicationName, correlationId, @@ -67,6 +69,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore DateTime? endTime = null, string httpMethod = null, string url = null, + Guid? userId = null, string userName = null, string applicationName = null, string correlationId = null, @@ -81,6 +84,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore endTime, httpMethod, url, + userId, userName, applicationName, correlationId, @@ -100,6 +104,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore DateTime? endTime = null, string httpMethod = null, string url = null, + Guid? userId = null, string userName = null, string applicationName = null, string correlationId = null, @@ -118,6 +123,7 @@ namespace Volo.Abp.AuditLogging.EntityFrameworkCore .WhereIf(hasException.HasValue && !hasException.Value, auditLog => auditLog.Exceptions == null || auditLog.Exceptions == "") .WhereIf(httpMethod != null, auditLog => auditLog.HttpMethod == httpMethod) .WhereIf(url != null, auditLog => auditLog.Url != null && auditLog.Url.Contains(url)) + .WhereIf(userId != null, auditLog => auditLog.UserId == userId) .WhereIf(userName != null, auditLog => auditLog.UserName == userName) .WhereIf(applicationName != null, auditLog => auditLog.ApplicationName == applicationName) .WhereIf(correlationId != null, auditLog => auditLog.CorrelationId == correlationId) diff --git a/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/MongoAuditLogRepository.cs b/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/MongoAuditLogRepository.cs index 9158d6ccdf..e67f78a2a8 100644 --- a/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/MongoAuditLogRepository.cs +++ b/modules/audit-logging/src/Volo.Abp.AuditLogging.MongoDB/Volo/Abp/AuditLogging/MongoDB/MongoAuditLogRepository.cs @@ -30,6 +30,7 @@ namespace Volo.Abp.AuditLogging.MongoDB DateTime? endTime = null, string httpMethod = null, string url = null, + Guid? userId = null, string userName = null, string applicationName = null, string correlationId = null, @@ -45,6 +46,7 @@ namespace Volo.Abp.AuditLogging.MongoDB endTime, httpMethod, url, + userId, userName, applicationName, correlationId, @@ -68,6 +70,7 @@ namespace Volo.Abp.AuditLogging.MongoDB DateTime? endTime = null, string httpMethod = null, string url = null, + Guid? userId = null, string userName = null, string applicationName = null, string correlationId = null, @@ -82,6 +85,7 @@ namespace Volo.Abp.AuditLogging.MongoDB endTime, httpMethod, url, + userId, userName, applicationName, correlationId, @@ -103,6 +107,7 @@ namespace Volo.Abp.AuditLogging.MongoDB DateTime? endTime = null, string httpMethod = null, string url = null, + Guid? userId = null, string userName = null, string applicationName = null, string correlationId = null, @@ -120,6 +125,7 @@ namespace Volo.Abp.AuditLogging.MongoDB .WhereIf(hasException.HasValue && !hasException.Value, auditLog => auditLog.Exceptions == null || auditLog.Exceptions == "") .WhereIf(httpMethod != null, auditLog => auditLog.HttpMethod == httpMethod) .WhereIf(url != null, auditLog => auditLog.Url != null && auditLog.Url.Contains(url)) + .WhereIf(userId != null, auditLog => auditLog.UserId == userId) .WhereIf(userName != null, auditLog => auditLog.UserName == userName) .WhereIf(applicationName != null, auditLog => auditLog.ApplicationName == applicationName) .WhereIf(correlationId != null, auditLog => auditLog.CorrelationId == correlationId) @@ -128,7 +134,6 @@ namespace Volo.Abp.AuditLogging.MongoDB .WhereIf(minDuration != null && minDuration > 0, auditLog => auditLog.ExecutionDuration >= minDuration); } - public virtual async Task> GetAverageExecutionDurationPerDayAsync( DateTime startDate, DateTime endDate,