去除小票打印二维码

This commit is contained in:
韩鹏辉
2024-06-25 10:01:45 +08:00
parent c63ce25e24
commit 566272ad67
5 changed files with 67 additions and 2 deletions

View File

@@ -96,4 +96,22 @@ public class RabbitConfig {
public Binding bindingPrint_Register() {
return BindingBuilder.bind(queuePrint_Register()).to(printExchange_Register()).with(RabbitConstants.PRINT_MECHINE_COLLECT_ROUTINGKEY_PUT);
}
@Bean
public DirectExchange consExchange_Register() {
return new DirectExchange(RabbitConstants.CONS_COLLECT_PUT);
}
@Bean
public Queue queuecons_Register() {
return new Queue(RabbitConstants.CONS_COLLECT_QUEUE_PUT, true); //队列持久
}
@Bean
public Binding bindingcons_Register() {
return BindingBuilder.bind(queuePrint_Register()).to(printExchange_Register()).with(RabbitConstants.CONS_COLLECT_ROUTINGKEY_PUT);
}
}

View File

@@ -38,4 +38,15 @@ public interface RabbitConstants {
public static final String INTEGRAL_ROUTINGKEY_PUT = "integral_routingkey_put1";
public static final String CONS_COLLECT_PUT="cons_collect_put";
public static final String CONS_COLLECT_QUEUE_PUT = "cons_collect_queue_put";
public static final String CONS_COLLECT_ROUTINGKEY_PUT = "cons_collect_routingkey_put";
}

View File

@@ -42,6 +42,17 @@ public class RabbitProducer implements RabbitTemplate.ConfirmCallback {
CorrelationData correlationId = new CorrelationData(UUID.randomUUID().toString());
rabbitTemplate.convertAndSend(RabbitConstants.INTEGRAL_PUT, RabbitConstants.INTEGRAL_ROUTINGKEY_PUT, content, correlationId);
}
public void cons(String content){
CorrelationData correlationId = new CorrelationData(UUID.randomUUID().toString());
rabbitTemplate.convertAndSend(RabbitConstants.CONS_COLLECT_PUT, RabbitConstants.CONS_COLLECT_ROUTINGKEY_PUT, content, correlationId);
}
@Override
public void confirm(CorrelationData correlationData, boolean ack, String cause) {
logger.info(" 回调id:" + correlationData);