|
|
@ -54,6 +54,21 @@ namespace Volo.Docs.Documents |
|
|
return await (await GetMongoQueryableAsync(cancellationToken)).Where(d => d.ProjectId == projectId).ToListAsync(GetCancellationToken(cancellationToken)); |
|
|
return await (await GetMongoQueryableAsync(cancellationToken)).Where(d => d.ProjectId == projectId).ToListAsync(GetCancellationToken(cancellationToken)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public virtual async Task<List<Document>> GetListByProjectId(Guid projectId, int skipCount, int maxResultCount, |
|
|
|
|
|
CancellationToken cancellationToken = default) |
|
|
|
|
|
{ |
|
|
|
|
|
return await (await GetMongoQueryableAsync(cancellationToken)).Where(d => d.ProjectId == projectId) |
|
|
|
|
|
.OrderBy(x => x.Name) |
|
|
|
|
|
.Skip(skipCount) |
|
|
|
|
|
.Take(maxResultCount) |
|
|
|
|
|
.ToListAsync(GetCancellationToken(cancellationToken)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
public virtual async Task<long> GetCountByProjectId(Guid projectId, CancellationToken cancellationToken = default) |
|
|
|
|
|
{ |
|
|
|
|
|
return await (await GetMongoQueryableAsync(cancellationToken)).LongCountAsync(x => x.ProjectId == projectId, GetCancellationToken(cancellationToken)); |
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
public async Task UpdateProjectLastCachedTimeAsync(Guid projectId, DateTime cachedTime, |
|
|
public async Task UpdateProjectLastCachedTimeAsync(Guid projectId, DateTime cachedTime, |
|
|
CancellationToken cancellationToken = default) |
|
|
CancellationToken cancellationToken = default) |
|
|
{ |
|
|
{ |
|
|
|