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