package com.github.wxiaoqi.security.admin.config;

import com.github.wxiaoqi.security.common.config.RabbitCommonConfig;
import com.github.wxiaoqi.security.common.config.rabbit.BindDTO;
import com.github.wxiaoqi.security.common.config.rabbit.RabbitConstant;
import org.springframework.context.annotation.Configuration;

import java.util.ArrayList;

import static com.github.wxiaoqi.security.common.config.rabbit.RabbitConstant.*;
/**
 * rabbitmq配置类
 * 包含： 不知道什么orderWater队列
 * @author zhoujw
 * @date 2019/7/15
 */
@Configuration
public class RabbitAdminConfig extends RabbitCommonConfig {

    public static final String ORDER_WATER_QUEUE = "order.water.queue";

    public static final String ORDER_FINLISH_USER_RE_QUEUE = "order.cancel.userRe.queue";
    static {
            myQueue = new ArrayList<BindDTO>(){{
            add(new BindDTO(ORDER_WATER_QUEUE, ADMIN_TOPIC, KEY_ORDER_PAY));
            add(new BindDTO(ORDER_WATER_QUEUE, ADMIN_TOPIC, KEY_ORDER_FINLISH));
            add(new BindDTO(ORDER_WATER_QUEUE, ADMIN_TOPIC, KEY_ORDER_CANCEL));
            add(new BindDTO(ORDER_FINLISH_USER_RE_QUEUE,  ADMIN_TOPIC, KEY_ORDER_FINLISH));
        }};
    }
}

