| | |
| | | |
| | | @Override |
| | | public void grabNews() { |
| | | addNews(1, EStockType.US.getStockUrl() + "stock-markets?key=" + EStockType.US.getStockKey() + "&type=6"); |
| | | addNews(1, EStockType.US.getStockUrl() + "stock-markets?key=" + EStockType.US.getStockKey() + "&type=1"); |
| | | } |
| | | |
| | | private void addNews(Integer type, String url) { |
| | |
| | | userPosition.setStockSpell(stock.getStockSpell()); |
| | | userPosition.setBuyOrderId(GeneratePosition.getPositionId()); |
| | | userPosition.setBuyOrderTime(new Date()); |
| | | userPosition.setBuyOrderPrice(nowPrice); |
| | | userPosition.setBuyOrderPrice(null == preMarketPrice ? nowPrice : preMarketPrice); |
| | | userPosition.setOrderDirection((buyType.intValue() == 0) ? "买涨" : "买跌"); |
| | | userPosition.setOrderNum(buyNum); |
| | | if (stock.getStockPlate() != null) { |