| | |
| | | package cc.mrbird.febs.rabbit.producer; |
| | | |
| | | import cc.mrbird.febs.rabbit.QueueEnum; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.amqp.rabbit.connection.CorrelationData; |
| | | import org.springframework.amqp.rabbit.core.RabbitTemplate; |
| | |
| | | CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString()); |
| | | rabbitTemplate.convertAndSend(QueueEnum.DISTRIB_PROFIT.getExchange(), QueueEnum.DISTRIB_PROFIT.getRoute(), id, correlationData); |
| | | } |
| | | |
| | | /** |
| | | * 层级奖励分发消息 |
| | | * |
| | | * 会员ID |
| | | * @param id |
| | | */ |
| | | public void sendLevelProfitMsg(Long id) { |
| | | log.info("层级奖励分发消息:{}", id); |
| | | CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString()); |
| | | rabbitTemplate.convertAndSend(QueueEnum.LEVEL_PROFIT.getExchange(), QueueEnum.LEVEL_PROFIT.getRoute(), id, correlationData); |
| | | } |
| | | |
| | | /** |
| | | * 计算是否有人出局分发消息 |
| | | */ |
| | | public void sendMemberOutMsg(Long id) { |
| | | log.info("计算是否有人出局:{}", DateUtil.now()); |
| | | CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString()); |
| | | rabbitTemplate.convertAndSend(QueueEnum.LEVEL_PROFIT.getExchange(), QueueEnum.LEVEL_PROFIT.getRoute(), id, correlationData); |
| | | } |
| | | } |