#409 GetQueuedPDFBooksAsync
This commit is contained in:
parent
e4bbaff175
commit
1a709e064b
@ -18507,6 +18507,13 @@
|
||||
طول تصویر بندانگشتی
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:RMuseum.Services.Implementation.PDFLibraryService.GetQueuedPDFBooksAsync(RSecurityBackend.Models.Generic.PagingParameterModel)">
|
||||
<summary>
|
||||
queued downloding pdf books
|
||||
</summary>
|
||||
<param name="paging"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="M:RMuseum.Services.Implementation.PDFLibraryService.BatchImportSohaLibraryAsync(System.Int32,System.Int32,System.Boolean)">
|
||||
<summary>
|
||||
batch import soha library
|
||||
@ -20217,6 +20224,13 @@
|
||||
fill missing book texts
|
||||
</summary>
|
||||
</member>
|
||||
<member name="M:RMuseum.Services.IPDFLibraryService.GetQueuedPDFBooksAsync(RSecurityBackend.Models.Generic.PagingParameterModel)">
|
||||
<summary>
|
||||
queued downloding pdf books
|
||||
</summary>
|
||||
<param name="paging"></param>
|
||||
<returns></returns>
|
||||
</member>
|
||||
<member name="T:RMuseum.Services.IPictureFileService">
|
||||
<summary>
|
||||
manipulating picture files
|
||||
|
||||
@ -444,5 +444,12 @@ namespace RMuseum.Services
|
||||
/// fill missing book texts
|
||||
/// </summary>
|
||||
void StartFillingMissingBookTextsAsync();
|
||||
|
||||
/// <summary>
|
||||
/// queued downloding pdf books
|
||||
/// </summary>
|
||||
/// <param name="paging"></param>
|
||||
/// <returns></returns>
|
||||
Task<RServiceResult<(PaginationMetadata PagingMeta, QueuedPDFBook[] Books)>> GetQueuedPDFBooksAsync(PagingParameterModel paging);
|
||||
}
|
||||
}
|
||||
|
||||
@ -4,20 +4,37 @@ using RMuseum.DbContext;
|
||||
using RMuseum.Models.Artifact;
|
||||
using RMuseum.Models.ImportJob;
|
||||
using RMuseum.Models.PDFLibrary;
|
||||
using RMuseum.Models.PDFLibrary.ViewModels;
|
||||
using RSecurityBackend.Models.Generic;
|
||||
using RSecurityBackend.Models.Image;
|
||||
using RSecurityBackend.Services.Implementation;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Drawing;
|
||||
using System.Drawing.Imaging;
|
||||
using System.IO;
|
||||
using System.Linq;
|
||||
using System.Threading.Tasks;
|
||||
namespace RMuseum.Services.Implementation
|
||||
{
|
||||
public partial class PDFLibraryService
|
||||
{
|
||||
|
||||
/// <summary>
|
||||
/// queued downloding pdf books
|
||||
/// </summary>
|
||||
/// <param name="paging"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<RServiceResult<(PaginationMetadata PagingMeta, QueuedPDFBook[] Books)>> GetQueuedPDFBooksAsync(PagingParameterModel paging)
|
||||
{
|
||||
try
|
||||
{
|
||||
var source =
|
||||
_context.QueuedPDFBooks.AsNoTracking()
|
||||
.OrderBy(t => t.Id)
|
||||
.AsQueryable();
|
||||
(PaginationMetadata PagingMeta, QueuedPDFBook[] Books) paginatedResult =
|
||||
await QueryablePaginator<QueuedPDFBook>.Paginate(source, paging);
|
||||
|
||||
return new RServiceResult<(PaginationMetadata PagingMeta, QueuedPDFBook[] Books)>(paginatedResult);
|
||||
}
|
||||
catch (Exception exp)
|
||||
{
|
||||
return new RServiceResult<(PaginationMetadata PagingMeta, QueuedPDFBook[] Books)>((null, null), exp.ToString());
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user