Helius
2021-03-18 cc6d44ddf61b67225461b159f0eccdf597982c10
src/main/java/com/xcong/excoin/modules/contract/service/impl/RabbitOrderServiceImpl.java
@@ -441,17 +441,22 @@
            fee = holdOrderEntity.getOpeningFeeAmount();
        }
        BigDecimal rewardRatio = profitOrLoss.divide(bondAmount, 4, BigDecimal.ROUND_DOWN);
        log.info("fee:{}", fee);
        ContractOrderEntity contractOrderEntity = ContractHoldOrderEntityMapper.INSTANCE.holdOrderToOrder(holdOrderEntity);
        contractOrderEntity.setId(null);
        contractOrderEntity.setEntrustOpeningPrice(newPrice);
        contractOrderEntity.setEntrustTime(new Date());
        contractOrderEntity.setClosingPrice(newPrice);
        contractOrderEntity.setTradeType(ContractOrderEntity.TRADE_TYPE_LIMIT_PRICE);
        contractOrderEntity.setOrderType(entrustOrder.getEntrustType());
        contractOrderEntity.setClosingType(closingType);
        contractOrderEntity.setSymbolCnt(closeCnt);
        contractOrderEntity.setRewardAmount(profitOrLoss);
        contractOrderEntity.setRewardRatio(rewardRatio);
        contractOrderEntity.setBondAmount(bondAmount);
        contractOrderEntity.setClosingTime(new Date());
        contractOrderEntity.setClosingFeeAmount(fee);
        contractOrderDao.insert(contractOrderEntity);