package com.xingxi.common.mq.publisher.order;

import com.alibaba.fastjson.JSON;
import com.xingxi.common.mq.bo.order.OrderBO;
import com.xingxi.common.mq.constant.OrderMqKey;
import com.xingxi.common.mq.core.AbstractRabbitPublisher;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * @ClassName OrderUnPaidMqPublisher
 * @projectName Xingxi
 * @Deacription 订单支付未完成推送
 * @Author FZ.Dong
 * @Date 2020/9/15 16:32
 * @Version 1.0
 **/

@Slf4j
@Component
public class OrderUnPaidMqPublisher extends AbstractRabbitPublisher {

    /**
     * 订单支付未完成发送消息
     * @param orderBO
     */
    public void sendMessage(OrderBO orderBO) {
        log.info("订单支付未完成发送消息[{}]", JSON.toJSONString(orderBO));
        super.send(orderBO, OrderMqKey.EDIT_EXCHANGE_DELAY, OrderMqKey.EDIT_ROUTE_DELAY_FOR_CREATED);
    }
}
