|
|
@ -22,8 +22,8 @@ namespace Volo.Abp.AuditLogging.MongoDB |
|
|
string httpMethod = null, string url = null, HttpStatusCode? httpStatusCode = null, bool includeDetails = false) |
|
|
string httpMethod = null, string url = null, HttpStatusCode? httpStatusCode = null, bool includeDetails = false) |
|
|
{ |
|
|
{ |
|
|
var query = GetMongoQueryable() |
|
|
var query = GetMongoQueryable() |
|
|
.WhereIf(httpMethod != null, q => q.HttpMethod == httpMethod) |
|
|
.WhereIf(httpMethod != null, q => q.HttpMethod.ToLowerInvariant() == httpMethod.ToLowerInvariant()) |
|
|
.WhereIf(url != null, q => q.Url == url) |
|
|
.WhereIf(url != null, q => q.Url.ToLowerInvariant().Contains(url.ToLowerInvariant())) |
|
|
.WhereIf(httpStatusCode != null && httpStatusCode > 0, q => q.HttpStatusCode == (int?)httpStatusCode); |
|
|
.WhereIf(httpStatusCode != null && httpStatusCode > 0, q => q.HttpStatusCode == (int?)httpStatusCode); |
|
|
|
|
|
|
|
|
var totalCount = await query.As<IMongoQueryable<AuditLog>>().LongCountAsync(); |
|
|
var totalCount = await query.As<IMongoQueryable<AuditLog>>().LongCountAsync(); |
|
|
|