@GET @RequestMapping("/singleTrainResult") @Produces(MediaType.APPLICATION_JSON) public SingleParameterTrainResults getSingleTrainResult() throws MidasException { logger.info("fetch single train result "); return stocksService.querySingleParameterTrainResults(); }
@GET @RequestMapping("/score/{cobFrom}/{cobTo}") @Produces(MediaType.APPLICATION_JSON) public List<StockScoreRecord> getStockScoreRecord( @PathVariable("cobFrom") Integer cobFrom, @PathVariable("cobTo") Integer cobTo) { return stocksService.getScoreDao().queryStockScoreRecordByRange(cobFrom, cobTo); }
@GET @RequestMapping("/day-stats/{cob}") @Produces(MediaType.APPLICATION_JSON) public List<StockDayStats> getStockScoreRecord(@PathVariable("cob") Integer cob) throws MidasException, ParseException { return stocksService.queryDayStatsList(cob); }
@GET @RequestMapping("/conceptScore") @Produces(MediaType.APPLICATION_JSON) public List<StockScoreRecord> getConceptStockScoreRecord() { int n = 10; logger.info("fetch " + n + " concept score result ..."); return stocksService.getConceptScoreDao().queryLastStockScoreRecord(n); }
@GET @RequestMapping("/multiply/{names}") @Produces(MediaType.APPLICATION_JSON) public List<StockVo> getTwoStocks(@PathVariable("names") String names) { List<StockVo> array = new ArrayList<>(); if (names != null) { String[] stringLets = names.split(" "); for (int i = 0; i < stringLets.length; i++) { if (StringPatternAware.isStockCode(stringLets[i])) { array.add(stocksService.queryStock(stringLets[i])); } } } return array; }
@GET @RequestMapping("/stockinfos") @Produces(MediaType.APPLICATION_JSON) public List<StockInfoDb> getStockBasicInfo() { return stocksService.getStockBasicInfo(); }
@GET @RequestMapping("/{name}") @Produces(MediaType.APPLICATION_JSON) public StockVo getStock(@PathVariable("name") String name) { return stocksService.queryStock(name); }
@GET @RequestMapping("/national-debt") @Produces(MediaType.APPLICATION_JSON) public List<MidasBond> getNationalDebt() { return stocksService.queryNationalDebt(); }