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

import com.alibaba.fastjson.JSON;
import com.xingxi.common.mq.bo.order.OrderDetailBO;
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 OrderDeliveryCanceledMqPublisher
 * @projectName Xingxi
 * @Deacription 支付完成订单推送
 * @Author FZ.Dong
 * @Date 2020/9/15 16:32
 * @Version 1.0
 **/


@Slf4j
@Component
public class OrderDeliveryCanceledMqPublisher extends AbstractRabbitPublisher {

    /**
     * 订单发货取消后发送消息
     * @param orderDetailBO
     */
    public void sendMessage(OrderDetailBO orderDetailBO) {
        log.info("订单发货取消推送订单[{}]", JSON.toJSONString(orderDetailBO));

        super.send(orderDetailBO, OrderMqKey.EDIT_EXCHANGE, OrderMqKey.EDIT_ROUTE_FOR_DELIVERY_CANCELED);
    }
}
