diff --git a/src/main/java/cn/stock/market/web/StockApiController.java b/src/main/java/cn/stock/market/web/StockApiController.java index 0702172..f2990c4 100644 --- a/src/main/java/cn/stock/market/web/StockApiController.java +++ b/src/main/java/cn/stock/market/web/StockApiController.java @@ -133,6 +133,16 @@ public class StockApiController { return ServerResponse.createBySuccess(market.toStockVo()); } + //印度股票个股详情 + @RequestMapping({"getIndiaIndexInfo.do"}) + @ApiOperation(value = "印度--获取指数详情", httpMethod = "GET") + @ResponseBody + public ServerResponse getIndiaIndexInfo(@RequestParam("stockCode") String stockCode) { + ParamUtils.verify("指数代码", stockCode, ParamUtils.STRING_NOT_EMPTY_VERIFY_AND_CONVERT_VALUE); + IndiaStockVO market = InvestingApis.of().market(StockCode.of(stockCode)); + return ServerResponse.createBySuccess(market.toStockVo()); + } + //印度股票列表 英情 @RequestMapping({"getINDStockList.do"}) @ApiOperation(value = "印度股票列表", httpMethod = "GET") @@ -172,6 +182,22 @@ public class StockApiController { return ServerResponse.createBySuccess(list); } + //印度指数-K线 + @RequestMapping({"getIndiaIndexTimeK.do"}) + @ApiOperation(value = "印度--获取指数K线", httpMethod = "GET") + @ResponseBody + @ApiImplicitParams({ + @ApiImplicitParam(name = "stockCode",value = "指数代码",dataType ="String", paramType = "query", required = true), + @ApiImplicitParam(name = "type",value = "min-时分线 day-日线 week-周线 month-月线, 3month-季度, 6month-半年, year-年",dataType ="String", paramType = "query", required = true), + }) + public ServerResponse getIndiaIndexTimeK(@RequestParam("stockCode") String stockCode, @RequestParam("type") String type) throws IOException { + ParamUtils.verify("指数代码", stockCode, ParamUtils.STRING_NOT_EMPTY_VERIFY_AND_CONVERT_VALUE); + ParamUtils.verify("K线类型", stockCode, ParamUtils.STRING_NOT_EMPTY_VERIFY_AND_CONVERT_VALUE); + + List list = InvestingApis.of().kline(StockCode.of(stockCode), type); + return ServerResponse.createBySuccess(list); + } + //根据股票id查询 股票指数、大盘指数信息 @RequestMapping({"getMarketByStockGid.do"}) @ApiOperation(value = "根据股票id查询 股票指数、大盘指数信息", httpMethod = "GET") @@ -214,7 +240,7 @@ public class StockApiController { return RequestCacheUtils.cache("getMinK.do", key, (string) -> { return this.stockService.getMinK(code, time, ma, size); }); - + } @RequestMapping({"getKLine.do"}) @@ -241,7 +267,7 @@ public class StockApiController { return this.stockService.getDayK_Echarts(code); }); } - + /*查询股票周线*/ @RequestMapping({"getWeekK.do"}) @ApiOperation(value = "查询股票周线", httpMethod = "GET") @@ -254,7 +280,7 @@ public class StockApiController { return this.stockService.getWeekK_Echarts(code); }); } - + /*查询股票月线*/ @RequestMapping({"getMonthK.do"}) @ApiOperation(value = "查询股票月线", httpMethod = "GET")