fix:修改bug

This commit is contained in:
xiaoliuhu
2023-12-20 09:24:50 +08:00
parent 8d1408e6d3
commit d96f3f2c31

View File

@@ -881,6 +881,10 @@ public class StockService {
String type = "min"; String type = "min";
List<JSONObject> list = InvestingApis.of().kline(StockCode.of(stockCode), type); List<JSONObject> list = InvestingApis.of().kline(StockCode.of(stockCode), type);
if(list == null || list.size() == 0){
type = "day";
list = InvestingApis.of().kline(StockCode.of(stockCode), type);
}
vo1.setKLine(list); vo1.setKLine(list);
indexVoList.add(vo1); indexVoList.add(vo1);
} catch (IOException e) { } catch (IOException e) {
@@ -895,6 +899,10 @@ public class StockService {
String type = "min"; String type = "min";
List<JSONObject> list = InvestingApis.of().kline(StockCode.of(stockCode), type); List<JSONObject> list = InvestingApis.of().kline(StockCode.of(stockCode), type);
if(list == null || list.size() == 0){
type = "day";
list = InvestingApis.of().kline(StockCode.of(stockCode), type);
}
vo2.setKLine(list); vo2.setKLine(list);
indexVoList.add(vo2); indexVoList.add(vo2);
} catch (IOException e) { } catch (IOException e) {