From 2d3de81973303a8f4e124473d69b2b9f77c38e99 Mon Sep 17 00:00:00 2001 From: Helius <wangdoubleone@gmail.com> Date: Fri, 28 Aug 2020 17:50:14 +0800 Subject: [PATCH] modify --- src/main/java/com/xcong/excoin/rabbit/init/OrderProducerInit.java | 16 ++++++++++------ 1 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/main/java/com/xcong/excoin/rabbit/init/OrderProducerInit.java b/src/main/java/com/xcong/excoin/rabbit/init/OrderProducerInit.java index 25638d8..ad8f3e0 100644 --- a/src/main/java/com/xcong/excoin/rabbit/init/OrderProducerInit.java +++ b/src/main/java/com/xcong/excoin/rabbit/init/OrderProducerInit.java @@ -59,9 +59,11 @@ // 爆仓价 BigDecimal forceSetPrice = order.getForceClosingPrice(); if (forceSetPrice != null) { - OrderModel model = new OrderModel(order.getId(), RabbitPriceTypeEnum.CLOSE_MORE_BOMB.getValue(), forceSetPrice.toPlainString(), - order.getSymbol(), order.getOperateNo()); - producer.sendPriceOperate(JSONObject.toJSONString(model)); + if (forceSetPrice.compareTo(BigDecimal.ZERO) >= 0) { + OrderModel model = new OrderModel(order.getId(), RabbitPriceTypeEnum.CLOSE_MORE_BOMB.getValue(), forceSetPrice.toPlainString(), + order.getSymbol(), order.getOperateNo()); + producer.sendPriceOperate(JSONObject.toJSONString(model)); + } } // 止损 BigDecimal stopLossPrice = order.getStopLossPrice(); @@ -85,9 +87,11 @@ // 爆仓价 BigDecimal forceSetPrice = order.getForceClosingPrice(); if (forceSetPrice != null) { - OrderModel model = new OrderModel(order.getId(), RabbitPriceTypeEnum.CLOSE_LESS_BOMB.getValue(), forceSetPrice.toPlainString(), - order.getSymbol(), order.getOperateNo()); - producer.sendPriceOperate(JSONObject.toJSONString(model)); + if (forceSetPrice.compareTo(BigDecimal.ZERO) >= 0) { + OrderModel model = new OrderModel(order.getId(), RabbitPriceTypeEnum.CLOSE_LESS_BOMB.getValue(), forceSetPrice.toPlainString(), + order.getSymbol(), order.getOperateNo()); + producer.sendPriceOperate(JSONObject.toJSONString(model)); + } } // 止损 BigDecimal stopLossPrice = order.getStopLossPrice(); -- Gitblit v1.9.1