Пример #1
0
 @GET
 @RequestMapping("/singleTrainResult")
 @Produces(MediaType.APPLICATION_JSON)
 public SingleParameterTrainResults getSingleTrainResult() throws MidasException {
   logger.info("fetch single train result ");
   return stocksService.querySingleParameterTrainResults();
 }
Пример #2
0
 @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);
 }
Пример #3
0
 @GET
 @RequestMapping("/day-stats/{cob}")
 @Produces(MediaType.APPLICATION_JSON)
 public List<StockDayStats> getStockScoreRecord(@PathVariable("cob") Integer cob)
     throws MidasException, ParseException {
   return stocksService.queryDayStatsList(cob);
 }
Пример #4
0
 @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);
 }
Пример #5
0
 @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;
 }
Пример #6
0
 @GET
 @RequestMapping("/stockinfos")
 @Produces(MediaType.APPLICATION_JSON)
 public List<StockInfoDb> getStockBasicInfo() {
   return stocksService.getStockBasicInfo();
 }
Пример #7
0
 @GET
 @RequestMapping("/{name}")
 @Produces(MediaType.APPLICATION_JSON)
 public StockVo getStock(@PathVariable("name") String name) {
   return stocksService.queryStock(name);
 }
Пример #8
0
 @GET
 @RequestMapping("/national-debt")
 @Produces(MediaType.APPLICATION_JSON)
 public List<MidasBond> getNationalDebt() {
   return stocksService.queryNationalDebt();
 }