时分线优化
This commit is contained in:
@@ -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.k.MinDataVO;
|
||||
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.HttpClientRequest;
|
||||
import cn.stock.market.utils.PropertiesUtil;
|
||||
@@ -569,6 +568,22 @@ public class StockService {
|
||||
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线 */
|
||||
public ServerResponse getIndexDayK(String code) {
|
||||
return getIndexK(code, "day");
|
||||
|
||||
@@ -65,4 +65,8 @@ public class StockPO {
|
||||
BigDecimal increaseRatio;
|
||||
|
||||
Integer stockState;
|
||||
|
||||
Integer stockExchangeId;
|
||||
|
||||
Integer stockSymbol;
|
||||
}
|
||||
|
||||
@@ -124,34 +124,14 @@ public class StockApiController {
|
||||
|
||||
//印度股票时线-K线
|
||||
@RequestMapping({"getINDTimeK.do"})
|
||||
@ApiOperation(value = "印度股票时线-K线", httpMethod = "GET")
|
||||
@ApiOperation(value = "印度股票K线", httpMethod = "GET")
|
||||
@ResponseBody
|
||||
public ServerResponse getINDTimeK(@RequestParam("stockCode") String stockCode) {
|
||||
return this.stockService.getTimeK(stockCode);
|
||||
}
|
||||
|
||||
//印度股票日线-K线
|
||||
@RequestMapping({"getINDDayK.do"})
|
||||
@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);
|
||||
@ApiImplicitParams({
|
||||
@ApiImplicitParam(name = "stockCode",value = "股票对应代码",dataType ="String",required = true),
|
||||
@ApiImplicitParam(name = "type",value = "type 0-时分线 1-日线 2-周线 3-月线",dataType ="Integer",required = true),
|
||||
})
|
||||
public ServerResponse getINDTimeK(@RequestParam("stockCode") String stockCode, @RequestParam("type") Integer type) {
|
||||
return this.stockService.getIndiaK(stockCode, type);
|
||||
}
|
||||
|
||||
//根据股票id查询 股票指数、大盘指数信息
|
||||
|
||||
Reference in New Issue
Block a user