Merge remote-tracking branch 'origin/develop' into develop

This commit is contained in:
Achilles
2023-12-26 18:00:40 +08:00
3 changed files with 164 additions and 0 deletions

View File

@@ -0,0 +1,44 @@
package cn.stock.market.web;
import cn.stock.market.infrastructure.api.TodayApis;
import cn.stock.market.utils.ServerResponse;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@Api(value = "/TodayApiController", tags = "today股票行情")
@RequestMapping({"/api/market/today/"})
public class TodayApiController {
@RequestMapping({"getTopGainers.do"})
@ApiOperation(value = "获取Top Gainers",notes = "exchange传nse或者bse", httpMethod = "GET")
@ResponseBody
public ServerResponse getTopGainers(@RequestParam("exchange") String exchange) {
return ServerResponse.createBySuccess(TodayApis.getTopGainers(exchange));
}
@RequestMapping({"getTopLosers.do"})
@ApiOperation(value = "获取 Top Losers",notes = "exchange传nse或者bse", httpMethod = "GET")
@ResponseBody
public ServerResponse getTopLosers(@RequestParam("exchange") String exchange) {
return ServerResponse.createBySuccess(TodayApis.getTopLosers(exchange));
}
@RequestMapping({"getMostActiveVolume.do"})
@ApiOperation(value = "获取 Most Active Volume",notes = "exchange传nse或者bse", httpMethod = "GET")
@ResponseBody
public ServerResponse getMostActiveVolume(@RequestParam("exchange") String exchange) {
return ServerResponse.createBySuccess(TodayApis.getMostActiveVolume(exchange));
}
@RequestMapping({"getMostActiveValue.do"})
@ApiOperation(value = "获取 Most Active Value",notes = "exchange传nse或者bse",httpMethod = "GET")
@ResponseBody
public ServerResponse getMostActiveValue(@RequestParam("exchange") String exchange) {
return ServerResponse.createBySuccess(TodayApis.getMostActiveValue(exchange));
}
}