| | |
| | | buyAmtAutual = buyAmtAutual.add(position.getBuyOrderPrice() |
| | | .multiply(new BigDecimal(position.getOrderNum())) |
| | | .divide(new BigDecimal(position.getOrderLever()), 2, RoundingMode.HALF_UP)); |
| | | UserPositionVO userPositionVO = assembleUserPositionVO(position); |
| | | historyProfitLoss = historyProfitLoss.add(userPositionVO.getProfitAndLose()); |
| | | |
| | | } |
| | | } |
| | | userInfoVO.setBuyAmtAutual(buyAmtAutual); |
| | |
| | | userInfoVO.setUserAmt(userAllAmt); |
| | | |
| | | List<UserPosition> userPositions = this.userPositionMapper.findMyPositionByCodeAndSpell(user.getId(), "", "", 1); |
| | | |
| | | if (userPositions.size() > 0) { |
| | | for (UserPosition position : userPositions) { |
| | | UserPositionVO userPositionVO = assembleUserPositionVO(position); |
| | | historyProfitLoss = historyProfitLoss.add(userPositionVO.getAllProfitAndLose()); |
| | | historyProfitLoss = historyProfitLoss.add(userPositionVO.getProfitAndLose()); |
| | | } |
| | | } |
| | | userInfoVO.setHistoryProfitLoss(historyProfitLoss); |