| | |
| | | |
| | | 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; |
| | | import org.springframework.amqp.core.MessagePostProcessor; |
| | | import org.springframework.amqp.rabbit.connection.CorrelationData; |
| | | import org.springframework.amqp.rabbit.core.RabbitTemplate; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import javax.validation.constraints.NotNull; |
| | | import java.util.Date; |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | |
| | | |
| | | } |
| | | |
| | | public void sendOrderReturn(Long id) { |
| | | log.info("发送消息:{}", id); |
| | | CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString()); |
| | | rabbitTemplate.convertAndSend(ExchangeConstants.EXCHANGE_DEFAULT, RouteKeyConstants.ROUTE_KEY_DEFAULT, id, correlationData); |
| | | /** |
| | | * 添加会员 |
| | | */ |
| | | 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); |
| | | } |
| | | |
| | | } |