KKSU
2024-04-17 15abe034d8d3e2fa86b2f3bf1bdbdb718a9a0909
src/main/java/com/xcong/excoin/modules/documentary/service/impl/FollowOrderOperationServiceImpl.java
@@ -387,6 +387,9 @@
        List<FollowFollowerOrderRelationEntity> relations = followFollowerOrderRelationDao.selectFollowHoldOrderByTradeOrderNo(contractHoldOrderEntity.getOrderNo());
        if (CollUtil.isNotEmpty(relations)) {
            for (FollowFollowerOrderRelationEntity relation : relations) {
                if (contractHoldOrderEntity.getId().equals(relation.getOrderId())) {
                    continue;
                }
                ContractHoldOrderEntity followHoldOrder = contractHoldOrderDao.selectById(relation.getOrderId());
                MemberEntity memberEntity = memberDao.selectById(relation.getMemberId());
                MemberWalletContractEntity wallet = memberWalletContractDao.findWalletContractByMemberIdAndSymbol(memberEntity.getId(), CoinTypeEnum.USDT.name());
@@ -405,7 +408,7 @@
                } else {
                    if (followHoldOrder.getBondAmount().subtract(followHoldOrder.getPrePaymentAmount()).subtract(bond).compareTo(BigDecimal.ZERO) < 0) {
                        log.info("超出保证金最大减少金额-1");
                        LogRecordUtils.insertFollowerNotice(memberEntity.getId(), NoticeConstant.CHANGE_BOND_TITLE, NoticeConstant.CHANGE_BOND_ADD_CONTENT_FAIL);
                        LogRecordUtils.insertFollowerNotice(memberEntity.getId(), NoticeConstant.CHANGE_BOND_TITLE, NoticeConstant.CHANGE_BOND_REDUCE_CONTENT_FAIL);
                        continue;
                    }
@@ -414,7 +417,7 @@
                        BigDecimal canReduceMax = followHoldOrder.getBondAmount().subtract(followHoldOrder.getPrePaymentAmount()).add(profitOrLoss);
                        if (canReduceMax.subtract(bond).compareTo(BigDecimal.ZERO) < 0) {
                            log.info("超出保证金最大减少金额-2");
                            LogRecordUtils.insertFollowerNotice(memberEntity.getId(), NoticeConstant.CHANGE_BOND_TITLE, NoticeConstant.CHANGE_BOND_ADD_CONTENT_FAIL);
                            LogRecordUtils.insertFollowerNotice(memberEntity.getId(), NoticeConstant.CHANGE_BOND_TITLE, NoticeConstant.CHANGE_BOND_REDUCE_CONTENT_FAIL);
                            continue;
                        }
                    }