| | |
| | | userPosition.setStockSpell(stock.getStockSpell()); |
| | | userPosition.setBuyOrderId(GeneratePosition.getPositionId()); |
| | | userPosition.setBuyOrderTime(new Date()); |
| | | userPosition.setBuyOrderPrice(null == preMarketPrice ? nowPrice : preMarketPrice); |
| | | // userPosition.setBuyOrderPrice(null == preMarketPrice ? nowPrice : preMarketPrice); |
| | | if(null == preMarketPrice){ |
| | | userPosition.setBuyOrderPrice(nowPrice); |
| | | }else { |
| | | userPosition.setBuyOrderPrice(preMarketPrice); |
| | | buyAmt = preMarketPrice.multiply(new BigDecimal(buyNum)).divide(new BigDecimal(lever)); |
| | | } |
| | | userPosition.setOrderDirection((buyType.intValue() == 0) ? "买涨" : "买跌"); |
| | | userPosition.setOrderNum(buyNum); |
| | | if (stock.getStockPlate() != null) { |
| | |
| | | userPosition.setOrderLever(lever); |
| | | userPosition.setOrderTotalPrice(buyAmt); |
| | | // 手续费 |
| | | |
| | | userPosition.setOrderFee(orderFree); |
| | | userPosition.setOrderSpread(BigDecimal.ZERO); |
| | | userPosition.setSpreadRatePrice(BigDecimal.ZERO); |