| | |
| | | if (CollectionUtils.isEmpty(orderModelList)) { |
| | | return; |
| | | } |
| | | System.out.println("本次执行的列表ASC"); |
| | | System.out.println(JSONObject.toJSONString(orderModelList)); |
| | | log.info("本次执行的列表ASC"); |
| | | // 根据订单的类型发送消息 |
| | | // 3:开空 7:爆仓平空 |
| | | // 9:止盈平多 12:止损平空 |
| | |
| | | List<OrderModel> bcList = new ArrayList<OrderModel>(); |
| | | // 开空 |
| | | List<OrderModel> wtkkList = new ArrayList<OrderModel>(); |
| | | // 委托平多 |
| | | List<OrderModel> wtpdList = new ArrayList<>(); |
| | | switch (model.getType()) { |
| | | case 3: |
| | | wtkkList.add(model); |
| | | break; |
| | | case 4: |
| | | wtpdList.add(model); |
| | | break; |
| | | case 7: |
| | | bcList.add(model); |
| | |
| | | if (CollectionUtils.isNotEmpty(wtkkList)) { |
| | | orderProducer.sendLimit(JSONObject.toJSONString(wtkkList)); |
| | | } |
| | | if (CollectionUtils.isNotEmpty(wtpdList)) { |
| | | orderProducer.sendLimitClose(JSONObject.toJSONString(wtpdList)); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | if (CollectionUtils.isEmpty(orderModelList)) { |
| | | return; |
| | | } |
| | | System.out.println("本次执行的列表Desc"); |
| | | System.out.println(JSONObject.toJSONString(orderModelList)); |
| | | log.info("本次执行的列表Desc"); |
| | | // 根据订单的类型发送消息 |
| | | // 2:开多6:爆仓平多 |
| | | // 10:止盈平空11:止损平多 |
| | |
| | | List<OrderModel> bcList = new ArrayList<OrderModel>(); |
| | | // 开多委托 |
| | | List<OrderModel> wtkdList = new ArrayList<OrderModel>(); |
| | | // 委托平空 |
| | | List<OrderModel> wtpkList = new ArrayList<>(); |
| | | switch (model.getType()) { |
| | | case 2: |
| | | wtkdList.add(model); |
| | | break; |
| | | case 5: |
| | | wtpkList.add(model); |
| | | break; |
| | | case 6: |
| | | bcList.add(model); |
| | |
| | | } |
| | | if (CollectionUtils.isNotEmpty(wtkdList)) { |
| | | orderProducer.sendLimit(JSONObject.toJSONString(wtkdList)); |
| | | |
| | | } |
| | | if (CollectionUtils.isNotEmpty(wtpkList)) { |
| | | orderProducer.sendLimitClose(JSONObject.toJSONString(wtpkList)); |
| | | } |
| | | } |
| | | } |