| | |
| | | @Autowired |
| | | private CryptosKlineService cryptosKlineService; |
| | | |
| | | @Scheduled(cron = "0 0 0 * * ?") |
| | | @Scheduled(cron = "0 0/1 * * * ?") |
| | | public void taskJob() { |
| | | StopWatch stopWatch = new StopWatch(); |
| | | log.info("Kline1DayJob start ... "); |
| | |
| | | List<Item> item_list = itemService.list(); |
| | | for (int i = 0; i < item_list.size(); i++) { |
| | | Item item = item_list.get(i); |
| | | if (MarketOpenChecker.isMarketOpenByItemCloseType(item.getOpenCloseType())) { |
| | | if (MarketOpenChecker.isMarketOpenByItemCloseType(item.getOpenCloseType()) && item.getType().equals("cryptos")) { |
| | | if (Item.cryptos.equalsIgnoreCase(item.getType())) { |
| | | cryptosKlineService.saveOne(item.getSymbol(), Kline.PERIOD_1DAY); |
| | | } else { |