| | |
| | | profit = point.multiply(new BigDecimal("0.01")).multiply(order.getVolumeOpen()).setScale(4, BigDecimal.ROUND_DOWN);; |
| | | System.out.println("------------------point-------------:"+point); |
| | | System.out.println("------------------profit------------:"+profit); |
| | | if (order.getLocationType() == 0) { |
| | | profit = order.getDepositOpen().add(order.getAddDepositOpen()).negate(); |
| | | System.out.println("------------------扣除保证金------------:"+profit); |
| | | if (order.getLocationType() == 1) { |
| | | Wallet wallet = this.walletService.findByUserId(order.getPartyId()); |
| | | System.out.println("------------------扣除余额------------:"+wallet.getMoney()); |
| | | profit = profit.subtract(wallet.getMoney()); |
| | | } |
| | | if (ContractOrder.DIRECTION_BUY.equals(order.getDirection())) { |
| | | order.setProfit(profit); |