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

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

import java.util.List;

/**
 * @ClassName OrderCanceledMqPublisher
 * @projectName Xingxi
 * @Deacription
 * @Author FZ.Dong
 * @Date 2020/9/18 16:20
 * @Version 1.0
 **/
@Slf4j
@Component
public class OrderCanceledMqPublisher extends AbstractRabbitPublisher {

    public void sendMessage(List<OrderCanceledBO> list){
        log.info("订单取消发送消息[{}]", JSON.toJSONString(list));
        super.send(list, OrderMqKey.EDIT_EXCHANGE, OrderMqKey.EDIT_ROUTE_FOR_CANCELED);
    }

}
