| | |
| | | |
| | | if (CollectionUtils.isNotEmpty(holdOrderEntities)) { |
| | | for (ContractHoldOrderEntity order : holdOrderEntities) { |
| | | log.info("---->>>{}", order.getSymbol()); |
| | | // 开多1,开空 2 |
| | | int openingType = order.getOpeningType(); |
| | | // 1:买入委托2:开多3:开空4:平多5:平空6:爆仓平多7:爆仓平空 |
| | |
| | | // 爆仓价 |
| | | 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(); |
| | |
| | | // 爆仓价 |
| | | 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(); |