| | |
| | | import cc.mrbird.febs.rabbit.constants.ExchangeConstants; |
| | | import cc.mrbird.febs.rabbit.constants.RouteKeyConstants; |
| | | import cc.mrbird.febs.rabbit.enumerates.RabbitQueueEnum; |
| | | import cn.hutool.core.util.IdUtil; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.amqp.AmqpException; |
| | | import org.springframework.amqp.core.Message; |
| | |
| | | |
| | | } |
| | | |
| | | /** |
| | | * 添加会员 |
| | | */ |
| | | public void sendAddRobotMsg(String inviteId) { |
| | | log.info("添加会员:{}", inviteId); |
| | | CorrelationData correlationData = new CorrelationData(IdUtil.simpleUUID()); |
| | | rabbitTemplate.convertAndSend(RabbitQueueEnum.IM_REDBAG_GET_ADD_ROBOT.getExchange(), |
| | | RabbitQueueEnum.IM_REDBAG_GET_ADD_ROBOT.getRoute(), |
| | | inviteId, |
| | | correlationData); |
| | | } |
| | | |
| | | /** |
| | | * 自动发送 |
| | | */ |
| | | public void sendAutoSendMsg(Long groupId) { |
| | | // log.info("自动发送:{}", groupId); |
| | | CorrelationData correlationData = new CorrelationData(IdUtil.simpleUUID()); |
| | | rabbitTemplate.convertAndSend(RabbitQueueEnum.IM_REDBAG_AUTO_SEND.getExchange(), |
| | | RabbitQueueEnum.IM_REDBAG_AUTO_SEND.getRoute(), |
| | | groupId, |
| | | correlationData); |
| | | } |
| | | |
| | | /** |
| | | * 自动返还 |
| | | */ |
| | | public void sendOverdueSendMsg(Long redbagId) { |
| | | log.info("自动返还:{}", redbagId); |
| | | CorrelationData correlationData = new CorrelationData(IdUtil.simpleUUID()); |
| | | rabbitTemplate.convertAndSend(RabbitQueueEnum.IM_REDBAG_OVERDUE.getExchange(), |
| | | RabbitQueueEnum.IM_REDBAG_OVERDUE.getRoute(), |
| | | redbagId, |
| | | correlationData); |
| | | } |
| | | |
| | | } |