From 2f6670dc8a71ec0eb2980408d558f2c3d6ddce2a Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Wed, 27 Jan 2021 18:30:42 +0800
Subject: [PATCH] modify

---
 src/main/java/com/xcong/excoin/rabbit/pricequeue/OrderOperatePriceService.java |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 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 2428c7b..b74d21f 100644
--- a/src/main/java/com/xcong/excoin/rabbit/pricequeue/OrderOperatePriceService.java
+++ b/src/main/java/com/xcong/excoin/rabbit/pricequeue/OrderOperatePriceService.java
@@ -1,6 +1,8 @@
 package com.xcong.excoin.rabbit.pricequeue;
 
 import com.alibaba.fastjson.JSONObject;
+import com.xcong.excoin.rabbit.pricequeue.whole.WholeDataQueue;
+import com.xcong.excoin.rabbit.pricequeue.whole.WholePriceDataModel;
 import lombok.extern.slf4j.Slf4j;
 import org.apache.commons.collections.CollectionUtils;
 
@@ -60,12 +62,12 @@
             // 判断这个单的这个类型是否有
 //            if (CollectionUtils.isNotEmpty(list)) {
                 // 新增
-                OrderModel orderModel = new OrderModel(orderId, type, price, null,order.getOperateNo());
+                OrderModel orderModel = new OrderModel(orderId, type, price, null,order.getOperateNo(), order.getMemberId());
                 list.add(orderModel);
 //            }
         } else {
             List<OrderModel> list = new ArrayList<OrderModel>();
-            OrderModel orderModel = new OrderModel(orderId, type, price, null,order.getOperateNo());
+            OrderModel orderModel = new OrderModel(orderId, type, price, null,order.getOperateNo(), order.getMemberId());
             list.add(orderModel);
             orderMap.put(price, list);
         }
@@ -95,12 +97,12 @@
             // 判断这个单的这个类型是否有
 //            if (CollectionUtils.isNotEmpty(list)) {
                 // 新增
-                OrderModel orderModel = new OrderModel(orderId, type, price, null,order.getOperateNo());
+                OrderModel orderModel = new OrderModel(orderId, type, price, null,order.getOperateNo(), order.getMemberId());
                 list.add(orderModel);
 //            }
         } else {
             List<OrderModel> list = new ArrayList<OrderModel>();
-            OrderModel orderModel = new OrderModel(orderId, type, price, null,order.getOperateNo());
+            OrderModel orderModel = new OrderModel(orderId, type, price, null,order.getOperateNo(), order.getMemberId());
             list.add(orderModel);
             orderMap.put(price, list);
         }
@@ -129,4 +131,15 @@
         }
     }
 
+    public static void wholePriceDataOperation(WholePriceDataModel wholePriceData) {
+        Map<String, WholePriceDataModel> dataModelMap = WholeDataQueue.MAP;
+
+        WholePriceDataModel isExistData = dataModelMap.get(wholePriceData.getMemberId().toString());
+        if (isExistData != null) {
+            dataModelMap.remove(wholePriceData.getMemberId().toString());
+        }
+
+        dataModelMap.put(wholePriceData.getMemberId().toString(), wholePriceData);
+    }
+
 }

--
Gitblit v1.9.1