diff --git a/src/main/java/cn/stock/market/web/StockApiController.java b/src/main/java/cn/stock/market/web/StockApiController.java index b6c8c5e..a0462d7 100644 --- a/src/main/java/cn/stock/market/web/StockApiController.java +++ b/src/main/java/cn/stock/market/web/StockApiController.java @@ -126,7 +126,6 @@ public class StockApiController { @ResponseBody public ServerResponse getINDStockInfo(@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()); } @@ -188,15 +187,9 @@ public class StockApiController { @ApiImplicitParam(name = "code",value = "股票对应代码(symbol)",dataType ="String",required = true), }) public ServerResponse getSingleStock(@RequestParam("code") String code) { - ServerResponse cache = null; - try { - cache = RequestCacheUtils.cache("getSingleStock.do", code, (string) -> { - return this.stockService.getSingleStock(code); - }); - } catch (Exception e) { - return ServerResponse.createByErrorMsg("tips.msg.221"); - } - return cache; + return RequestCacheUtils.cache("getSingleStock.do", code, (string) -> { + return this.stockService.getSingleStock(code); + }); } @RequestMapping({"getMinK.do"})