Helius
2020-09-13 7b60ac3ef78ca5f7b3b85e23b761afa5b3462ce8
modify
1 files modified
7 ■■■■■ changed files
src/main/java/com/xcong/excoin/modules/contract/service/impl/ContractHoldOrderServiceImpl.java 7 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/excoin/modules/contract/service/impl/ContractHoldOrderServiceImpl.java
@@ -251,14 +251,15 @@
//                    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);