Helius
2020-07-09 64f4dc86a0c0ffb14166c762775e468716dd47e3
src/main/java/com/xcong/excoin/modules/contract/service/impl/ContractHoldOrderServiceImpl.java
@@ -579,7 +579,7 @@
        OrderDetailVo orderDetailVo = ContractOrderEntityMapper.INSTANCE.entityToDetailVo(contractOrderEntity);
        BigDecimal feeSpread = cacheSettingUtils.getTradeSetting().getFeeSpreadRatio();
        orderDetailVo.setClosingFeeAmount(orderDetailVo.getClosingFeeAmount() == null ? orderDetailVo.getClosingFeeAmount() : orderDetailVo.getClosingFeeAmount().multiply(feeSpread).setScale(8, BigDecimal.ROUND_DOWN));
        orderDetailVo.setOpeningFeeAmount(orderDetailVo.getOpeningFeeAmount().multiply(feeSpread).setScale(8, BigDecimal.ROUND_DOWN));
        orderDetailVo.setOpeningFeeAmount(orderDetailVo.getOpeningFeeAmount() == null ? orderDetailVo.getOpeningFeeAmount() : orderDetailVo.getOpeningFeeAmount().multiply(feeSpread).setScale(8, BigDecimal.ROUND_DOWN));
        return Result.ok(orderDetailVo);
    }
@@ -633,10 +633,10 @@
        OrderModel model = null;
        // 开多
        if (ContractHoldOrderEntity.OPENING_TYPE_MORE == type) {
            model = new OrderModel(id, RabbitPriceTypeEnum.CLOSE_MORE_BOMB.getValue(), forceClosingPrice.setScale(8, RoundingMode.HALF_UP).toPlainString(), symbol);
            model = new OrderModel(id, RabbitPriceTypeEnum.CLOSE_MORE_BOMB.getValue(), forceClosingPrice.setScale(8, RoundingMode.HALF_UP).toPlainString(), symbol, 1);
            // 开空
        } else {
            model = new OrderModel(id, RabbitPriceTypeEnum.CLOSE_LESS_BOMB.getValue(), forceClosingPrice.setScale(8, RoundingMode.HALF_UP).toPlainString(), symbol);
            model = new OrderModel(id, RabbitPriceTypeEnum.CLOSE_LESS_BOMB.getValue(), forceClosingPrice.setScale(8, RoundingMode.HALF_UP).toPlainString(), symbol, 1);
        }
        producer.sendPriceOperate(JSONObject.toJSONString(model));
    }