From 9219e18a9b2fb06b95b5c881b057d3fde7270ca3 Mon Sep 17 00:00:00 2001
From: zainali5120 <512061637@qq.com>
Date: Thu, 25 Feb 2021 10:28:54 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/whole_new' into whole_new

---
 src/main/java/com/xcong/excoin/rabbit/consumer/OperateOrderPriceConsumer.java |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/rabbit/consumer/OperateOrderPriceConsumer.java b/src/main/java/com/xcong/excoin/rabbit/consumer/OperateOrderPriceConsumer.java
index 45ff0f7..be949a2 100644
--- a/src/main/java/com/xcong/excoin/rabbit/consumer/OperateOrderPriceConsumer.java
+++ b/src/main/java/com/xcong/excoin/rabbit/consumer/OperateOrderPriceConsumer.java
@@ -5,6 +5,8 @@
 import com.xcong.excoin.configurations.RabbitMqConfig;
 import com.xcong.excoin.rabbit.pricequeue.OrderModel;
 import com.xcong.excoin.rabbit.pricequeue.OrderOperatePriceService;
+import com.xcong.excoin.rabbit.pricequeue.whole.WholePriceDataModel;
+import lombok.extern.slf4j.Slf4j;
 import org.springframework.amqp.core.Message;
 import org.springframework.amqp.rabbit.annotation.RabbitListener;
 import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
@@ -16,6 +18,7 @@
  * 后台打包开启 APP 不开启
  * @author helius
  */
+@Slf4j
 @Component
 @ConditionalOnProperty(prefix = "app", name = "newest-price-update-job", havingValue = "true")
 public class OperateOrderPriceConsumer {
@@ -31,7 +34,7 @@
     @RabbitListener(queues = RabbitMqConfig.QUEUE_PRICEOPERATE)
     public void onMessageMorePro(Message message, Channel channel) {
         String content = new String(message.getBody());
-        System.out.println("我收到了用户的订单操作消息:" + content);
+        log.info("我收到了用户的订单操作消息:{}", content);
         // 操作前的map
         // 转为model
         OrderModel orderModel = JSONObject.parseObject(content, OrderModel.class);
@@ -40,5 +43,13 @@
 
     }
 
+    @RabbitListener(queues = RabbitMqConfig.QUEUE_WHOLE_PRICE)
+    public void onMessageWholePrice(Message message, Channel channel) {
+        String content = new String(message.getBody());
+
+        log.info("我收到了用户的全仓价格消息 : {}", content);
+        OrderOperatePriceService.wholePriceDataOperation(Long.parseLong(content));
+    }
+
 
 }

--
Gitblit v1.9.1