From 5ecb374cad235d0010889cd4d8d0a6b74b9ebbd0 Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Tue, 14 Jul 2020 19:23:23 +0800
Subject: [PATCH] 20200714   代码提交

---
 src/main/java/com/xcong/excoin/rabbit/pricequeue/OrderOperatePriceService.java |   10 +++++++++-
 1 files changed, 9 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/rabbit/pricequeue/OrderOperatePriceService.java b/src/main/java/com/xcong/excoin/rabbit/pricequeue/OrderOperatePriceService.java
index 7685839..c8f559a 100644
--- a/src/main/java/com/xcong/excoin/rabbit/pricequeue/OrderOperatePriceService.java
+++ b/src/main/java/com/xcong/excoin/rabbit/pricequeue/OrderOperatePriceService.java
@@ -1,5 +1,7 @@
 package com.xcong.excoin.rabbit.pricequeue;
 
+import com.alibaba.fastjson.JSONObject;
+import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.CollectionUtils;
 
 import java.util.ArrayList;
@@ -11,6 +13,7 @@
 /**
  * 处理消费者的订单止盈等价格信息
  */
+@Slf4j
 public class OrderOperatePriceService {
 
     /**
@@ -48,7 +51,9 @@
         Long orderId = order.getOrderId();
         queue.add(new DescBigDecimal(price));
 
+        log.info("原有:{}", JSONObject.toJSONString(orderMap));
         removeExistOrder(type, orderId, orderMap);
+        log.info("删除后:{}", JSONObject.toJSONString(orderMap));
         if (orderMap.containsKey(price)) {
             // 有这个价的key
             List<OrderModel> list = orderMap.get(price);
@@ -64,6 +69,7 @@
             list.add(orderModel);
             orderMap.put(price, list);
         }
+        log.info("调整后:{}", JSONObject.toJSONString(orderMap));
     }
 
 
@@ -79,9 +85,10 @@
         int type = order.getType();
         Long orderId = order.getOrderId();
         queue.add(new AscBigDecimal(price));
+        log.info("原有:{}", JSONObject.toJSONString(orderMap));
         // 需要找到这个订单的原始的单进行处理
         removeExistOrder(type, orderId, orderMap);
-
+        log.info("删除后:{}", JSONObject.toJSONString(orderMap));
         if (orderMap.containsKey(price)) {
             // 有这个价的key
             List<OrderModel> list = orderMap.get(price);
@@ -97,6 +104,7 @@
             list.add(orderModel);
             orderMap.put(price, list);
         }
+        log.info("调整后:{}", JSONObject.toJSONString(orderMap));
     }
 
     private static void removeExistOrder(Integer type, Long orderId, Map<String, List<OrderModel>> orderMap) {

--
Gitblit v1.9.1