fix:修改定时任务

This commit is contained in:
xiaoliuhu
2023-12-19 09:48:39 +08:00
parent 5e8f90be10
commit 83999e53b1
4 changed files with 80 additions and 5 deletions

View File

@@ -203,7 +203,7 @@ public class InvestingInvokerApis {
}
public static void main(String[] args) throws IOException {
JSONObject __market = of().__market(StockCode.of("17988"));
JSONObject __market = of().__page(1,100);
System.out.println(__market);
JSONObject __page = of().__page(1, 10);

View File

@@ -24,7 +24,7 @@ import java.util.concurrent.TimeUnit;
@Component
public class InvestingTask {
@Scheduled(cron = "0 0 5 * * ?")
@Scheduled(cron = "0 0 6 * * ?")
public void syncIndiaData(){
log.info("同步股票数据开始。。。。");
Map<String, Stock> stockMap = StockRepository.of().cacheCodeMap();
@@ -74,7 +74,7 @@ public class InvestingTask {
if((total - currentTotal) < pageSize ){
pageSize = total - currentTotal;
}
if(total == currentTotal){
if(total <= currentTotal){
break;
}
pageNum ++;