| | |
| | | // canAddMaxBond = BigDecimal.ZERO; |
| | | // } |
| | | BigDecimal canReduceMaxBond = holdOrderEntity.getBondAmount().subtract(holdOrderEntity.getPrePaymentAmount()); |
| | | if (canReduceMaxBond.compareTo(BigDecimal.ZERO) < 0) { |
| | | canReduceMaxBond = BigDecimal.ZERO; |
| | | } |
| | | |
| | | if (rewardRatio.compareTo(BigDecimal.ZERO) < 0) { |
| | | canReduceMaxBond = canReduceMaxBond.add(rewardRatio); |
| | | } |
| | | |
| | | if (canReduceMaxBond.compareTo(BigDecimal.ZERO) < 0) { |
| | | canReduceMaxBond = BigDecimal.ZERO; |
| | | } |
| | | |
| | | holdOrderListVo.setCanReduceMaxBond(canReduceMaxBond); |
| | | holdOrderListVo.setCanAddMaxBond(walletContractEntity.getAvailableBalance()); |
| | | holdOrderListVo.setReturnRate(returnRate); |