fix:修改bug

This commit is contained in:
xiaoliuhu
2023-12-20 23:01:34 +08:00
parent 4b52b3cc83
commit 1709f8978d
2 changed files with 5 additions and 2 deletions

View File

@@ -797,7 +797,11 @@ public class StockService {
int pageSize = 300;
try {
for(int i = 0;i < pageNum;i ++) {
String tmpl = "https://api.investing.com/api/financialdata/assets/equitiesByCountry/default?fields-list=id,name,symbol,high,low,last,lastPairDecimal,change,changePercent,volume,time,isOpen,url,flag,countryNameTranslated,exchangeId,performanceDay,performanceWeek,performanceMonth,performanceYtd,performanceYear,performance3Year,technicalHour,technicalDay,technicalWeek,technicalMonth,avgVolume,fundamentalMarketCap,fundamentalRevenue,fundamentalRatio,fundamentalBeta,pairType&country-id=14&page={}&page-size={}&include-major-indices=false&include-additional-indices=false&include-primary-sectors=false&include-other-indices=false&limit=0";
String url = StrFormatter.format(tmpl, pageNum - 1, pageSize);
// String str = HttpClientRequest.doGet(url);
JSONObject jsonObject = InvestingInvokerApis.of().__page(pageNum, pageSize);
// JSONObject jsonObject = JSON.parseObject(str);
int total = 0;
if(jsonObject.containsKey("total")){
total = Integer.parseInt(jsonObject.get("total").toString());
@@ -894,7 +898,7 @@ public class StockService {
stock.setIsShow(0);
stock.setAddTime(new Date());
stock.setStockState(0);
stock.setFundamentalMarketCap(fundamentalMarketCap);
// stock.setFundamentalMarketCap(fundamentalMarketCap);
list.add(stock);
}

View File

@@ -69,5 +69,4 @@ public class StockPO {
String stockExchangeId;
String stockSymbol;
String fundamentalMarketCap;
}