package com.jy.business.config;

import cn.hutool.extra.spring.SpringUtil;
import lombok.NoArgsConstructor;
import org.springframework.amqp.rabbit.core.RabbitTemplate;

@NoArgsConstructor
public class RabbitMqUtil {

    private static final RabbitTemplate rabbitTemplate = SpringUtil.getBean(RabbitTemplate.class);

    /**
     * 发送合同确认到账
     */
    public static void sendConfirmFundReceived(Long id) {
        rabbitTemplate.convertAndSend(RabbitConfig.JY_DIRECT_EXCHANGE, RabbitConfig.CONFIRM_RECEIVED_QUEUE, id);
    }

}
