From 44d9363f288cab8336e1ddba0e14ef336bf5c994 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Thu, 13 May 2021 14:25:14 +0800
Subject: [PATCH] modify
---
src/main/java/com/xcong/excoin/rabbit/consumer/YunDingConsumer.java | 27 +++++++++++++++++++++++++++
src/main/resources/mapper/platform/PlatformSymbolsCoinDao.xml | 1 +
2 files changed, 28 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/xcong/excoin/rabbit/consumer/YunDingConsumer.java b/src/main/java/com/xcong/excoin/rabbit/consumer/YunDingConsumer.java
new file mode 100644
index 0000000..865220e
--- /dev/null
+++ b/src/main/java/com/xcong/excoin/rabbit/consumer/YunDingConsumer.java
@@ -0,0 +1,27 @@
+package com.xcong.excoin.rabbit.consumer;
+
+import com.rabbitmq.client.Channel;
+import com.xcong.excoin.configurations.RabbitMqConfig;
+import com.xcong.excoin.modules.yunding.service.XchProfitService;
+import lombok.extern.slf4j.Slf4j;
+import org.springframework.amqp.core.Message;
+import org.springframework.amqp.rabbit.annotation.RabbitListener;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
+import org.springframework.stereotype.Component;
+
+@Slf4j
+@Component
+@ConditionalOnProperty(prefix = "app", name = "yunding-consumer", havingValue = "true")
+public class YunDingConsumer {
+
+ @Autowired
+ private XchProfitService xchProfitService;
+
+ @RabbitListener(queues = RabbitMqConfig.QUEUE_XCH_USDT_PRIFIT)
+ public void addFollowOrder(Message message, Channel channel) {
+ String content = new String(message.getBody());
+ log.info("USDT返利 : {}", content);
+ xchProfitService.usdtProfitDistributorByOrderId(Long.parseLong(content));
+ }
+}
diff --git a/src/main/resources/mapper/platform/PlatformSymbolsCoinDao.xml b/src/main/resources/mapper/platform/PlatformSymbolsCoinDao.xml
index 63033e5..b1876db 100644
--- a/src/main/resources/mapper/platform/PlatformSymbolsCoinDao.xml
+++ b/src/main/resources/mapper/platform/PlatformSymbolsCoinDao.xml
@@ -11,6 +11,7 @@
platform_symbols_coin a
LEFT JOIN member_coin_address b ON a.id = b.symbolscoin_id
AND member_id = #{memberId}
+ where a.name in ('USDT', 'XCH')
GROUP BY
a.id,
a. NAME
--
Gitblit v1.9.1