优化出参
This commit is contained in:
@@ -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<Object> 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"})
|
||||
|
||||
Reference in New Issue
Block a user