Browse Source

更新版本

master
赵新宇 2 weeks ago
parent
commit
723aadf2b5
  1. 10
      API/Wood.Service/Controllers/CheryRecurringJobOutPageController.cs

10
API/Wood.Service/Controllers/CheryRecurringJobOutPageController.cs

@ -80,7 +80,7 @@ namespace TaskManager.Controllers
var readedcount = _jobDbContext.Set<T>().Where(p => p.RequestDate == inputdate).Count();
if (readedcount == 0)//第一次请求用false,接口人胡启名要求
{
PagedResponse<ToutputDetial> firstResponse = await GetPageAsync(new PAGE_DTO() { Date = date, IsForce = false});
PagedResponse<ToutputDetial> firstResponse = await GetPageAsync(new PAGE_DTO() { Date = date,PageSize=200, IsForce = false});
if (firstResponse == null || firstResponse.Code != 200)
{
@ -138,10 +138,8 @@ namespace TaskManager.Controllers
// 循环请求剩余页面
for (currentPage = 2; currentPage <= totalPages; currentPage++)
{
PAGE_DTO pageinput = new PAGE_DTO() { Date = date, PageNum = currentPage, IsForce = false };
PAGE_DTO pageinput = new PAGE_DTO() { Date = date, PageNum = currentPage, PageSize = 200, IsForce = false };
Console.WriteLine($"正在请求第 {currentPage} 页...");
PagedResponse<ToutputDetial> pageResponse = await GetPageAsync(pageinput);
if (pageResponse?.Data.Rows != null && pageResponse.Data.Rows.Count > 0)
@ -190,7 +188,7 @@ namespace TaskManager.Controllers
else
{
PagedResponse<ToutputDetial> firstResponse = await GetPageAsync(new PAGE_DTO() { Date = date, IsForce = true });
PagedResponse<ToutputDetial> firstResponse = await GetPageAsync(new PAGE_DTO() { Date = date, PageSize = 200, IsForce = true });
if (firstResponse == null || firstResponse.Code != 200)
{
await _logger.AddInfo("首次请求失败,无法获取分页信息。", TaskName);
@ -243,7 +241,7 @@ namespace TaskManager.Controllers
// 循环请求剩余页面
for (currentPage = 2; currentPage <= totalPages; currentPage++)
{
PAGE_DTO pageinput = new PAGE_DTO() { Date = date, PageNum = currentPage, IsForce = true };
PAGE_DTO pageinput = new PAGE_DTO() { Date = date, PageNum = currentPage, PageSize = 200, IsForce = true };
//Console.WriteLine($"正在请求第 {currentPage} 页...");
PagedResponse<ToutputDetial> pageResponse = await GetPageAsync(pageinput);
if (pageResponse?.Data.Rows != null && pageResponse.Data.Rows.Count > 0)

Loading…
Cancel
Save