mirror of
http://192.168.1.205:9980/cf_devdept2/cf_imes_server.git
synced 2026-08-12 21:02:08 +08:00
新增webcad生产单导入:1、cad拆单同步新结构优化适配;2、cad拆单支持基于配置限制板件数量和是否异步拆单,新增异步拆单;
This commit is contained in:
+54
@@ -0,0 +1,54 @@
|
||||
package com.cf.imes.module.system.config;
|
||||
|
||||
import org.springframework.amqp.core.Binding;
|
||||
import org.springframework.amqp.core.BindingBuilder;
|
||||
import org.springframework.amqp.core.CustomExchange;
|
||||
import org.springframework.amqp.core.Queue;
|
||||
import org.springframework.amqp.core.QueueBuilder;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
import static com.cf.imes.framework.mq.rabbitmq.constant.RabbitMqConstants.SYSTEM_ADVERTISEMENT_UPDATE_DELAYED_EXCHANGE;
|
||||
import static com.cf.imes.framework.mq.rabbitmq.constant.RabbitMqConstants.SYSTEM_ADVERTISEMENT_UPDATE_DELAYED_QUEUE;
|
||||
import static com.cf.imes.framework.mq.rabbitmq.constant.RabbitMqConstants.SYSTEM_ADVERTISEMENT_UPDATE_DELAYED_ROUTING_KEY;
|
||||
|
||||
/**
|
||||
* @author Gqr
|
||||
* @since 2025/5/13 11:42
|
||||
*/
|
||||
@Configuration
|
||||
public class ChenfengRabbitMQSystemConfiguration {
|
||||
/**
|
||||
* 广告状态修改 延迟队列
|
||||
*/
|
||||
@Bean
|
||||
public Queue advertisementUpdateDelayedQueue(){
|
||||
return QueueBuilder.durable(SYSTEM_ADVERTISEMENT_UPDATE_DELAYED_QUEUE).build();
|
||||
}
|
||||
|
||||
/**
|
||||
* 广告状态修改 定义延迟交换机
|
||||
*/
|
||||
@Bean
|
||||
public CustomExchange advertisementUpdateDelayExchange() {
|
||||
Map<String, Object> args = new HashMap<>();
|
||||
args.put("x-delayed-type", "direct");
|
||||
return new CustomExchange(SYSTEM_ADVERTISEMENT_UPDATE_DELAYED_EXCHANGE, "x-delayed-message", true, false, args);
|
||||
}
|
||||
|
||||
/**
|
||||
* 广告状态修改 队列与交换机绑定
|
||||
*/
|
||||
@Bean
|
||||
public Binding advertisementUpdateQueueABindingX(@Qualifier("advertisementUpdateDelayedQueue") Queue queue,
|
||||
@Qualifier("advertisementUpdateDelayExchange") CustomExchange delayedExchange){
|
||||
return BindingBuilder.bind(queue)
|
||||
.to(delayedExchange)
|
||||
.with(SYSTEM_ADVERTISEMENT_UPDATE_DELAYED_ROUTING_KEY)
|
||||
.noargs();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user