| | |
| | | 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; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.stereotype.Component; |
| | | |
| | | import java.util.UUID; |
| | | |
| | | /** |
| | | * @author wzy |
| | |
| | | |
| | | } |
| | | |
| | | public void sendAchieveTreeMsg(Long id) { |
| | | log.info("发送业绩树消息:{}", id); |
| | | CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString()); |
| | | rabbitTemplate.convertAndSend(QueueEnum.ACHIEVE_TREE.getExchange(), QueueEnum.ACHIEVE_TREE.getRoute(), id, correlationData); |
| | | } |
| | | // /** |
| | | // * speed 支付订单 |
| | | // * @param orderId 订单ID |
| | | // */ |
| | | // public void sendSpeedPayOrderMsg(Long orderId) { |
| | | // log.info("sendSpeedPayOrderMsg:{}", orderId); |
| | | // CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString()); |
| | | // rabbitTemplate.convertAndSend(QueueEnum.SPEED_PAY_ORDER.getExchange(), QueueEnum.SPEED_PAY_ORDER.getRoute(), orderId, correlationData); |
| | | // } |
| | | // |
| | | // /** |
| | | // * speed 代理升级 |
| | | // * @param memberId |
| | | // */ |
| | | // public void sendAutoLevelUpTeamMsg(@NotNull Long memberId) { |
| | | // log.info("sendAutoLevelUpTeamMsg:{}", memberId); |
| | | // CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString()); |
| | | // rabbitTemplate.convertAndSend(QueueEnum.SPEED_LEVEL_UP_TEAM.getExchange(), QueueEnum.SPEED_LEVEL_UP_TEAM.getRoute(), memberId, correlationData); |
| | | // } |
| | | // |
| | | // /** |
| | | // * speed 代理升级 |
| | | // * @param memberId |
| | | // */ |
| | | // public void sendAutoLevelUpMsg(@NotNull Long memberId) { |
| | | // log.info("sendAutoLevelUpMsg:{}", memberId); |
| | | // CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString()); |
| | | // rabbitTemplate.convertAndSend(QueueEnum.SPEED_LEVEL_UP.getExchange(), QueueEnum.SPEED_LEVEL_UP.getRoute(), memberId, correlationData); |
| | | // } |
| | | // |
| | | // /** |
| | | // * speed 直推返利 |
| | | // */ |
| | | // public void sendDirectPerkMsg(@NotNull Long memberId) { |
| | | // log.info("sendDirectPerkMsg:{}", memberId); |
| | | // CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString()); |
| | | // rabbitTemplate.convertAndSend(QueueEnum.SPEED_DIRECT_PERK.getExchange(), QueueEnum.SPEED_DIRECT_PERK.getRoute(), memberId, correlationData); |
| | | // } |
| | | // |
| | | // /** |
| | | // * speed 卖出资产 |
| | | // */ |
| | | // public void sendSalePackageMsg(@NotNull Long flowId) { |
| | | // log.info("sendSalePackageMsg:{}", flowId); |
| | | // CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString()); |
| | | // rabbitTemplate.convertAndSend(QueueEnum.SPEED_SALE_PACKAGE.getExchange(), QueueEnum.SPEED_SALE_PACKAGE.getRoute(), flowId, correlationData); |
| | | // } |
| | | |
| | | /** |
| | | * 消费者在tfc应用 |
| | | * |
| | | * @param data |
| | | */ |
| | | public void sendTfcFee(String data) { |
| | | log.info("发送提现手续费消息:{}", data); |
| | | CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString()); |
| | | rabbitTemplate.convertAndSend(QueueEnum.WITHDRAW_FEE.getExchange(), QueueEnum.WITHDRAW_FEE.getRoute(), data, correlationData); |
| | | } |
| | | |
| | | /** |
| | | * 发送手续费分发消息 |
| | | * |
| | | * @param id |
| | | */ |
| | | public void sendFeeDistributeMsg(Long id) { |
| | | log.info("发送手续费分发消息:{}", id); |
| | | 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("计算是否有人出局:{}", id); |
| | | CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString()); |
| | | rabbitTemplate.convertAndSend(QueueEnum.MEMBER_OUT.getExchange(), QueueEnum.MEMBER_OUT.getRoute(), id, correlationData); |
| | | } |
| | | |
| | | /** |
| | | * 转账拨币 |
| | | */ |
| | | public void sendBnbTransferMsg(Long id) { |
| | | log.info("转账拨币:{}", id); |
| | | CorrelationData correlationData = new CorrelationData(UUID.randomUUID().toString()); |
| | | rabbitTemplate.convertAndSend(QueueEnum.BNB_TRANSFER.getExchange(), QueueEnum.BNB_TRANSFER.getRoute(), id, correlationData); |
| | | } |
| | | } |