Administrator
2025-09-02 f8f1d6a91b32077c69dd97334559fe3165ff79b6
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;
            }
        });
    }
    /**
     * 发送代理自动升级消息
     *
@@ -76,4 +87,53 @@
        log.info("发送返利消息:{}", orderId);
        rabbitTemplate.convertAndSend(RabbitQueueEnum.AGENT_REUTRN_MONEY.getExchange(), RabbitQueueEnum.AGENT_REUTRN_MONEY.getRoute(), orderId);
    }
    public void sendOrderCoupon(Long id) {
        log.info("发送使用优惠卷消息:{}", id);
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend(RabbitQueueEnum.ORDER_COUPON.getExchange(), RabbitQueueEnum.ORDER_COUPON.getRoute(), id, correlationData);
    }
    public void sendGetScoreMsg(Long orderId) {
        log.info("发送获得积分消息:{}", orderId);
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend(RabbitQueueEnum.GET_SCORE_MSG.getExchange(), RabbitQueueEnum.GET_SCORE_MSG.getRoute(), orderId, correlationData);
    }
    public void sendVipLevelUp(Long orderId) {
        log.info("发送会员升级消息:{}", orderId);
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend(RabbitQueueEnum.VIP_LEVEL_UP.getExchange(), RabbitQueueEnum.VIP_LEVEL_UP.getRoute(), orderId, correlationData);
    }
    public void sendSaleLevelUp(Long orderId) {
        log.info("发送团长升级:{}", orderId);
        CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString());
        rabbitTemplate.convertAndSend(RabbitQueueEnum.SALE_LEVEL_UP.getExchange(), RabbitQueueEnum.SALE_LEVEL_UP.getRoute(), orderId, correlationData);
    }
    public void sendCheckActivityItem(Long orderId) {
        log.info("核销活动门票:{}", orderId);
        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);
    }
}