Helius
2021-05-21 979a4972fa011b74b7fd0ecde4941da13da1c4a1
modify
2 files modified
8 ■■■■ changed files
src/main/java/com/xcong/excoin/rabbit/producer/OtcProducter.java 6 ●●●● patch | view | raw | blame | history
src/main/resources/mapper/otc/OtcOrderDao.xml 2 ●●● patch | view | raw | blame | history
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
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>