no message
This commit is contained in:
@@ -195,42 +195,6 @@ public class InvestingApis {
|
||||
return page;
|
||||
}
|
||||
|
||||
public PageInfo<IndiaStockVO> page_nifty100(int currPage, int pageSize) throws IOException {
|
||||
JSONObject json = InvestingInvokerApis.of().__page_nifty100(currPage, pageSize);
|
||||
|
||||
int totalPages = (json.getIntValue("total") / json.getIntValue("pageSize")) + 1;
|
||||
log.info("总页码数: {}", totalPages);
|
||||
|
||||
List<IndiaStockVO> items = json.getJSONArray("data").stream().map(val -> {
|
||||
JSONObject j = (JSONObject) val;
|
||||
IndiaStockVO vo = new IndiaStockVO();
|
||||
vo.setName(j.getString("Name"));
|
||||
vo.setCname(j.getString("Name"));
|
||||
vo.setCode(j.getString("Symbol"));
|
||||
vo.setIsLock(0);
|
||||
vo.setIsShow(0);
|
||||
vo.setNowPrice(numberToString(j.getString("Last")));
|
||||
vo.setOpen("--");
|
||||
vo.setClose("--");
|
||||
vo.setNumber(numberToString(j.getString("Chg")));
|
||||
vo.setRate(numberToString(j.getString("ChgPct")));
|
||||
vo.setHigh(numberToString(j.getString("High")));
|
||||
vo.setLow(numberToString(j.getString("Low")));
|
||||
vo.setUrl(numberToString(j.getString("Url")));
|
||||
vo.setTargetId(j.getString("Id"));
|
||||
vo.setType("印度");
|
||||
return vo;
|
||||
}).collect(Collectors.toList());
|
||||
|
||||
PageInfo<IndiaStockVO> page = new PageInfo<>();
|
||||
page.setPageNum(currPage);
|
||||
page.setPageSize(pageSize);
|
||||
page.setTotal(json.getIntValue("total"));
|
||||
page.setPages(totalPages);
|
||||
page.setList(items);
|
||||
return page;
|
||||
}
|
||||
|
||||
public List<IndiaStockVO> thirdIndiaList() throws IOException {
|
||||
List<IndiaStockVO> list = Lists.newArrayList();
|
||||
Stopwatch stopwatch = Stopwatch.createStarted();
|
||||
|
||||
Reference in New Issue
Block a user