fix: 月线数据优化
This commit is contained in:
@@ -214,12 +214,7 @@ public class RefinitivConsumer implements ApplicationRunner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
List<String> topSymbols = RefinitivUtil.decodeTopData(result[0]);
|
List<String> topSymbols = RefinitivUtil.decodeTopData(result[0]);
|
||||||
for (String topSymbol : topSymbols) {
|
return getStockList(String.join(",", topSymbols));
|
||||||
RetifiveStockInfo stockInfo = getDetail(topSymbol);
|
|
||||||
list.add(stockInfo);
|
|
||||||
}
|
|
||||||
|
|
||||||
return list;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -350,7 +345,8 @@ public class RefinitivConsumer implements ApplicationRunner {
|
|||||||
.header("Authorization","Bearer " + token)
|
.header("Authorization","Bearer " + token)
|
||||||
.execute();
|
.execute();
|
||||||
if(response.getStatus() != 200){
|
if(response.getStatus() != 200){
|
||||||
throw new SysTipsException("获取股票K线失败");
|
log.error("获取股票k线信息失败,code:"+response.getStatus());
|
||||||
|
return result;
|
||||||
}
|
}
|
||||||
JSONArray jsonArray = JSONArray.parseArray(response.body());
|
JSONArray jsonArray = JSONArray.parseArray(response.body());
|
||||||
JSONArray dateArray = JSONObject.parseObject(jsonArray.get(0).toString()).getJSONArray("data");
|
JSONArray dateArray = JSONObject.parseObject(jsonArray.get(0).toString()).getJSONArray("data");
|
||||||
@@ -476,7 +472,8 @@ public class RefinitivConsumer implements ApplicationRunner {
|
|||||||
.basicAuth(appKey,"")
|
.basicAuth(appKey,"")
|
||||||
.execute();
|
.execute();
|
||||||
if(response.getStatus() != 200){
|
if(response.getStatus() != 200){
|
||||||
throw new SysTipsException("获取token失败");
|
log.error("获取toekn失败,code:"+response.getStatus());
|
||||||
|
return null;
|
||||||
}
|
}
|
||||||
JSONObject data = JSONObject.parseObject(response.body());
|
JSONObject data = JSONObject.parseObject(response.body());
|
||||||
data.put("expiry_tm",System.currentTimeMillis() + (Long.valueOf(data.get("expires_in").toString())-10));
|
data.put("expiry_tm",System.currentTimeMillis() + (Long.valueOf(data.get("expires_in").toString())-10));
|
||||||
|
|||||||
Reference in New Issue
Block a user