| | |
| | | |
| | | if (i > 0) { |
| | | // 发送委托消息 |
| | | if (holdOrderEntity.getOpeningType() == ContractEntrustOrderEntity.ENTRUST_TYPE_OPEN_MORE) { |
| | | OrderModel model = new OrderModel(holdOrderEntity.getId(), RabbitPriceTypeEnum.ENTRUST_OPEN_MORE.getValue(), submitCloseEntrustDto.getEntrustPrice().setScale(8, RoundingMode.HALF_UP).toPlainString(), holdOrderEntity.getSymbol()); |
| | | producer.sendPriceOperate(JSONObject.toJSONString(model)); |
| | | } else { |
| | | OrderModel model = new OrderModel(holdOrderEntity.getId(), RabbitPriceTypeEnum.ENTRUST_OPEN_LESS.getValue(), submitCloseEntrustDto.getEntrustPrice().setScale(8, RoundingMode.HALF_UP).toPlainString(), holdOrderEntity.getSymbol()); |
| | | producer.sendPriceOperate(JSONObject.toJSONString(model)); |
| | | } |
| | | } |
| | | return Result.ok("委托成功"); |
| | | } |