fix:修改bug
This commit is contained in:
@@ -797,7 +797,11 @@ public class StockService {
|
|||||||
int pageSize = 300;
|
int pageSize = 300;
|
||||||
try {
|
try {
|
||||||
for(int i = 0;i < pageNum;i ++) {
|
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 = InvestingInvokerApis.of().__page(pageNum, pageSize);
|
||||||
|
// JSONObject jsonObject = JSON.parseObject(str);
|
||||||
int total = 0;
|
int total = 0;
|
||||||
if(jsonObject.containsKey("total")){
|
if(jsonObject.containsKey("total")){
|
||||||
total = Integer.parseInt(jsonObject.get("total").toString());
|
total = Integer.parseInt(jsonObject.get("total").toString());
|
||||||
@@ -894,7 +898,7 @@ public class StockService {
|
|||||||
stock.setIsShow(0);
|
stock.setIsShow(0);
|
||||||
stock.setAddTime(new Date());
|
stock.setAddTime(new Date());
|
||||||
stock.setStockState(0);
|
stock.setStockState(0);
|
||||||
stock.setFundamentalMarketCap(fundamentalMarketCap);
|
// stock.setFundamentalMarketCap(fundamentalMarketCap);
|
||||||
list.add(stock);
|
list.add(stock);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -69,5 +69,4 @@ public class StockPO {
|
|||||||
String stockExchangeId;
|
String stockExchangeId;
|
||||||
|
|
||||||
String stockSymbol;
|
String stockSymbol;
|
||||||
String fundamentalMarketCap;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user