时分线优化

This commit is contained in:
dengli
2023-12-02 09:20:21 +08:00
parent 68e0248ce6
commit d0ff0077a0
3 changed files with 27 additions and 28 deletions

View File

@@ -47,7 +47,6 @@ import cn.stock.market.infrastructure.api.sina.vo.MarketVO;
import cn.stock.market.infrastructure.api.sina.vo.MarketVOResult; import cn.stock.market.infrastructure.api.sina.vo.MarketVOResult;
import cn.stock.market.infrastructure.api.sina.vo.k.MinDataVO; import cn.stock.market.infrastructure.api.sina.vo.k.MinDataVO;
import cn.stock.market.infrastructure.api.sina.vo.k.echarts.EchartsDataVO; import cn.stock.market.infrastructure.api.sina.vo.k.echarts.EchartsDataVO;
import cn.stock.market.infrastructure.stockdb.po.QStockPO;
import cn.stock.market.utils.GetPyByChinese; import cn.stock.market.utils.GetPyByChinese;
import cn.stock.market.utils.HttpClientRequest; import cn.stock.market.utils.HttpClientRequest;
import cn.stock.market.utils.PropertiesUtil; import cn.stock.market.utils.PropertiesUtil;
@@ -569,6 +568,22 @@ public class StockService {
return SpringUtils.getBean(StockService.class); return SpringUtils.getBean(StockService.class);
} }
public ServerResponse getIndiaK(String code, Integer type) {
if (type == 0) {
return getYCTimeK(code);
}
if (type == 1) {
return getYQDayK(code);
}
if (type == 2) {
return getYQWeekK(code);
}
if (type == 3) {
return getYQMonthK(code);
}
return null;
}
/* 指数日线-K线 */ /* 指数日线-K线 */
public ServerResponse getIndexDayK(String code) { public ServerResponse getIndexDayK(String code) {
return getIndexK(code, "day"); return getIndexK(code, "day");

View File

@@ -65,4 +65,8 @@ public class StockPO {
BigDecimal increaseRatio; BigDecimal increaseRatio;
Integer stockState; Integer stockState;
Integer stockExchangeId;
Integer stockSymbol;
} }

View File

@@ -124,34 +124,14 @@ public class StockApiController {
//印度股票时线-K线 //印度股票时线-K线
@RequestMapping({"getINDTimeK.do"}) @RequestMapping({"getINDTimeK.do"})
@ApiOperation(value = "印度股票时线-K线", httpMethod = "GET") @ApiOperation(value = "印度股票K线", httpMethod = "GET")
@ResponseBody @ResponseBody
public ServerResponse getINDTimeK(@RequestParam("stockCode") String stockCode) { @ApiImplicitParams({
return this.stockService.getTimeK(stockCode); @ApiImplicitParam(name = "stockCode",value = "股票对应代码",dataType ="String",required = true),
} @ApiImplicitParam(name = "type",value = "type 0-时分线 1-日线 2-周线 3-月线",dataType ="Integer",required = true),
})
//印度股票日线-K线 public ServerResponse getINDTimeK(@RequestParam("stockCode") String stockCode, @RequestParam("type") Integer type) {
@RequestMapping({"getINDDayK.do"}) return this.stockService.getIndiaK(stockCode, type);
@ApiOperation(value = "印度股票日线-K线", httpMethod = "GET")
@ResponseBody
public ServerResponse getINDDayK(@RequestParam("stockCode") String stockCode) {
return this.stockService.getDayK(stockCode);
}
//印度股票周线-K线
@RequestMapping({"getINDWeekK.do"})
@ApiOperation(value = "印度股票周线-K线", httpMethod = "GET")
@ResponseBody
public ServerResponse getINDWeekK(@RequestParam("stockCode") String stockCode) {
return this.stockService.getWeekK(stockCode);
}
//印度股票月线-K线
@RequestMapping({"getINDMonthK.do"})
@ApiOperation(value = "印度股票月线-K线", httpMethod = "GET")
@ResponseBody
public ServerResponse getINDMonthK(@RequestParam("stockCode") String stockCode) {
return this.stockService.getMonthK(stockCode);
} }
//根据股票id查询 股票指数、大盘指数信息 //根据股票id查询 股票指数、大盘指数信息