Helius
2020-09-13 b98dd4349c26a6d282e6e19b4d31e8e1ef5b5f5e
Merge branch 'master' into whole_new
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
@@ -474,14 +474,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);