Commit 666cbde3 by wutong

分页查询问题

parent 445d6ee2
...@@ -13,6 +13,6 @@ public class EbayResult { ...@@ -13,6 +13,6 @@ public class EbayResult {
private String currency; private String currency;
private AccountEntries accountEntries; private AccountEntries accountEntries;
private PaginationResult paginationResult; private PaginationResult paginationResult;
private String entriesPerPage; private Integer entriesPerPage;
private Integer pageNumber; private Integer pageNumber;
} }
...@@ -138,7 +138,7 @@ public class EbayFinanceSyncJob extends PointJob { ...@@ -138,7 +138,7 @@ public class EbayFinanceSyncJob extends PointJob {
} }
} }
} }
pageNumber = ebayResult.getPageNumber(); pageNumber = ebayResult.getEntriesPerPage();
} else { } else {
throw new RuntimeException("授权错误"); throw new RuntimeException("授权错误");
} }
...@@ -146,7 +146,7 @@ public class EbayFinanceSyncJob extends PointJob { ...@@ -146,7 +146,7 @@ public class EbayFinanceSyncJob extends PointJob {
throw new RuntimeException("接口调用失败"); throw new RuntimeException("接口调用失败");
} }
job.setPageIndex(job.getPageIndex() + 1); job.setPageIndex(job.getPageIndex() + 1);
} while (job.getPageIndex() <= pageNumber); } while (!pageNumber.equals(0));
job.setPageIndex(1); job.setPageIndex(1);
job.setStartTime(job.getEndTime()); job.setStartTime(job.getEndTime());
job.setEndTime(job.getStartTime().plusDays(job.getIntervalTime()).isAfter(LocalDateTime.now()) ? LocalDateTime.now() : job.getEndTime().plusDays(job.getIntervalTime())); job.setEndTime(job.getStartTime().plusDays(job.getIntervalTime()).isAfter(LocalDateTime.now()) ? LocalDateTime.now() : job.getEndTime().plusDays(job.getIntervalTime()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment