Administrator
2025-07-22 48e926f7f767a6d65cab2b52a057d345c2ee7e0e
src/main/java/cc/mrbird/febs/rabbit/producter/AgentProducer.java
@@ -62,6 +62,17 @@
        });
    }
    public void sendClothesOrderCancelDelayMsg(Long id, Long times) {
        log.info("发送自动取消订单消息:{}, {}", id, times);
        rabbitTemplate.convertAndSend(RabbitQueueEnum.ORDER_CANCEL_DELAY_TTL.getExchange(), RabbitQueueEnum.ORDER_CANCEL_DELAY_TTL.getRoute(), id, new MessagePostProcessor() {
            @Override
            public Message postProcessMessage(Message message) throws AmqpException {
                message.getMessageProperties().setExpiration(String.valueOf(times));
                return message;
            }
        });
    }
    /**
     * 发送代理自动升级消息
     *
@@ -111,4 +122,18 @@
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend(RabbitQueueEnum.ACTIVITY_ORDER_ITEM_CHECK.getExchange(), RabbitQueueEnum.ACTIVITY_ORDER_ITEM_CHECK.getRoute(), orderId, correlationData);
    }
    public void sendAddLike(Long socialId) {
        log.info("点赞:{}", socialId);
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend(RabbitQueueEnum.CLOTHES_ADD_LIKE.getExchange(), RabbitQueueEnum.CLOTHES_ADD_LIKE.getRoute(), socialId, correlationData);
    }
    public void sendAddCollect(Long socialId) {
        log.info("收藏:{}", socialId);
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend(RabbitQueueEnum.CLOTHES_ADD_COLLECT.getExchange(), RabbitQueueEnum.CLOTHES_ADD_COLLECT.getRoute(), socialId, correlationData);
    }
}