| | |
| | |
|
| | | if (forceSetPrice.compareTo(BigDecimal.ZERO) > 0) {
|
| | | log.info("id:{}, type:{}, forceSetPrice:{}, symbol:{}, operateNo:{}", id, type, forceSetPrice, symbol, operateNo);
|
| | | sendOrderBombMsg(id, type, forceSetPrice, symbol, operateNo);
|
| | | sendOrderBombMsg(id, type, forceSetPrice, symbol, operateNo, memberEntity.getId());
|
| | | }
|
| | | }
|
| | | }
|
| | |
| | |
|
| | | */
|
| | |
|
| | | private static void sendOrderBombMsg(Long id, int type, BigDecimal forceClosingPrice, String symbol, int operateNo) {
|
| | | private static void sendOrderBombMsg(Long id, int type, BigDecimal forceClosingPrice, String symbol, int operateNo, Long memberId) {
|
| | | 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, operateNo);
|
| | | model = new OrderModel(id, RabbitPriceTypeEnum.CLOSE_MORE_BOMB.getValue(), forceClosingPrice.setScale(8, RoundingMode.HALF_UP).toPlainString(), symbol, operateNo, memberId);
|
| | | // 开空
|
| | | } else {
|
| | | model = new OrderModel(id, RabbitPriceTypeEnum.CLOSE_LESS_BOMB.getValue(), forceClosingPrice.setScale(8, RoundingMode.HALF_UP).toPlainString(), symbol, operateNo);
|
| | | model = new OrderModel(id, RabbitPriceTypeEnum.CLOSE_LESS_BOMB.getValue(), forceClosingPrice.setScale(8, RoundingMode.HALF_UP).toPlainString(), symbol, operateNo, memberId);
|
| | | }
|
| | | SpringContextHolder.getBean(OrderProducer.class).sendPriceOperate(JSONObject.toJSONString(model));
|
| | | }
|