예제 #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();
 }