Ejemplo n.º 1
0
 @GET
 @RequestMapping("/singleTrainResult")
 @Produces(MediaType.APPLICATION_JSON)
 public SingleParameterTrainResults getSingleTrainResult() throws MidasException {
   logger.info("fetch single train result ");
   return stocksService.querySingleParameterTrainResults();
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo n.º 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);
 }
Ejemplo 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;
 }
Ejemplo n.º 6
0
 @GET
 @RequestMapping("/stockinfos")
 @Produces(MediaType.APPLICATION_JSON)
 public List<StockInfoDb> getStockBasicInfo() {
   return stocksService.getStockBasicInfo();
 }
Ejemplo n.º 7
0
 @GET
 @RequestMapping("/{name}")
 @Produces(MediaType.APPLICATION_JSON)
 public StockVo getStock(@PathVariable("name") String name) {
   return stocksService.queryStock(name);
 }
Ejemplo n.º 8
0
 @GET
 @RequestMapping("/national-debt")
 @Produces(MediaType.APPLICATION_JSON)
 public List<MidasBond> getNationalDebt() {
   return stocksService.queryNationalDebt();
 }