From 979a4972fa011b74b7fd0ecde4941da13da1c4a1 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Fri, 21 May 2021 17:42:59 +0800
Subject: [PATCH] modify

---
 src/main/java/com/xcong/excoin/rabbit/producer/OtcProducter.java |    6 +++++-
 src/main/resources/mapper/otc/OtcOrderDao.xml                    |    2 +-
 2 files changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/main/java/com/xcong/excoin/rabbit/producer/OtcProducter.java b/src/main/java/com/xcong/excoin/rabbit/producer/OtcProducter.java
index 829fbeb..6f3cc27 100644
--- a/src/main/java/com/xcong/excoin/rabbit/producer/OtcProducter.java
+++ b/src/main/java/com/xcong/excoin/rabbit/producer/OtcProducter.java
@@ -4,6 +4,7 @@
 import cn.hutool.core.util.IdUtil;
 import com.xcong.excoin.configurations.RabbitMqConfig;
 import lombok.extern.slf4j.Slf4j;
+import org.springframework.amqp.core.AmqpTemplate;
 import org.springframework.amqp.rabbit.connection.CorrelationData;
 import org.springframework.amqp.rabbit.core.RabbitTemplate;
 import org.springframework.beans.factory.annotation.Autowired;
@@ -17,6 +18,9 @@
 
     @Autowired
     private RabbitTemplate rabbitTemplate;
+
+    @Autowired
+    private AmqpTemplate amqpTemplate;
 
     @Autowired
     public OtcProducter(RabbitTemplate rabbitTemplate) {
@@ -33,7 +37,7 @@
     public void sendDelayOrderMsg(String content) {
         log.info("-----{}", new Date());
         CorrelationData correlationData = new CorrelationData(IdUtil.simpleUUID());
-        rabbitTemplate.convertAndSend(RabbitMqConfig.EXCHANGE_DELAY, RabbitMqConfig.ROUTING_KEY_DELAY, content,correlationData );
+        amqpTemplate.convertAndSend(RabbitMqConfig.EXCHANGE_DELAY, RabbitMqConfig.ROUTING_KEY_DELAY, content);
     }
 
     @Override
diff --git a/src/main/resources/mapper/otc/OtcOrderDao.xml b/src/main/resources/mapper/otc/OtcOrderDao.xml
index 245633e..8938669 100644
--- a/src/main/resources/mapper/otc/OtcOrderDao.xml
+++ b/src/main/resources/mapper/otc/OtcOrderDao.xml
@@ -4,7 +4,7 @@
 
     <select id="selectOrderListUnFinish" resultType="com.xcong.excoin.modules.otc.entity.OtcOrder">
         select * from otc_order
-        where status not in (2,4) and member_id=#{memberId} and entrust_order_id=#{entrustOrderId}
+        where status in (1,2) and member_id=#{memberId} and entrust_order_id=#{entrustOrderId}
     </select>
 
 

--
Gitblit v1.9.1