| | |
| | | package cc.mrbird.febs.rabbit.consumer; |
| | | |
| | | import cc.mrbird.febs.dapp.service.DappSystemService; |
| | | import cc.mrbird.febs.rabbit.QueueConstants; |
| | | import cn.hutool.core.date.DateUtil; |
| | | import com.rabbitmq.client.Channel; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.amqp.core.Message; |
| | | import org.springframework.amqp.rabbit.annotation.RabbitListener; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | @Autowired |
| | | private DappSystemService dappSystemService; |
| | | |
| | | // @RabbitListener(queues = QueueConstants.ACHIEVE_TREE) |
| | | // public void achieveTree(String id) { |
| | | // log.info("收到业绩树消息"); |
| | | // dappSystemService.achieveTree(Long.parseLong(id)); |
| | | // /** |
| | | // * speed 支付订单 |
| | | // */ |
| | | // @RabbitListener(queues = QueueConstants.QUEUE_SPEED_PAY_ORDER) |
| | | // public void speedPayOrderMsg(Long orderId) { |
| | | // log.info("speedPayOrderMsg:{}", orderId); |
| | | // try { |
| | | // dappSystemService.speedPayOrderMsg(orderId); |
| | | // } catch (Exception e) { |
| | | // log.error("speedPayOrderErr:", e); |
| | | // } |
| | | // } |
| | | // |
| | | // /** |
| | | // * 生产者在tfc应用 |
| | | // * @param data |
| | | // * speed 代理升级 |
| | | // */ |
| | | // @RabbitListener(queues = QueueConstants.TFC_NEW_PRICE) |
| | | // public void tfcNewPrice(String data) { |
| | | //// dappSystemService.tfcNewPrice(data); |
| | | // @RabbitListener(queues = QueueConstants.QUEUE_SPEED_LEVEL_UP_TEAM) |
| | | // public void speedAutoLevelUpTeamMsg(Long memberId) { |
| | | // log.info("speedAutoLevelUpTeamMsg:{}", memberId); |
| | | // try { |
| | | // dappSystemService.speedAutoLevelUpTeamMsg(memberId); |
| | | // } catch (Exception e) { |
| | | // log.error("speedAutoLevelUpTeamErr:", e); |
| | | // } |
| | | // } |
| | | // |
| | | // /** |
| | | // * @param data |
| | | // * speed 代理升级 |
| | | // */ |
| | | // @RabbitListener(queues = QueueConstants.DISTRIB_PROFIT) |
| | | // public void feeDistribute(String data) { |
| | | // dappSystemService.feeDistribute(data); |
| | | // @RabbitListener(queues = QueueConstants.QUEUE_SPEED_LEVEL_UP) |
| | | // public void speedAutoLevelUpMsg(Long memberId) { |
| | | // log.info("speedAutoLevelUpMsg:{}", memberId); |
| | | // try { |
| | | // dappSystemService.speedAutoLevelUpMsg(memberId); |
| | | // } catch (Exception e) { |
| | | // log.error("speedAutoLevelUpErr:", e); |
| | | // } |
| | | // } |
| | | |
| | | /**层级奖励分发消息 |
| | | * @param id |
| | | */ |
| | | // @RabbitListener(queues = QueueConstants.QUEUE_LEVEL_PROFIT) |
| | | // public void levelProfit(Long id) { |
| | | // log.info("消费层级奖励分发消息:{}", id); |
| | | // dappSystemService.levelProfit(id); |
| | | // } |
| | | |
| | | /**计算是否有人出局分发消息 |
| | | * @param id |
| | | */ |
| | | // @RabbitListener(queues = QueueConstants.QUEUE_MEMBER_OUT) |
| | | // public void memberOut(Long id) { |
| | | // log.info("消费计算是否有人出局:{}", id); |
| | | // dappSystemService.memberOut(id); |
| | | // } |
| | | |
| | | /**转账拨币 |
| | | * @param id |
| | | */ |
| | | @RabbitListener(queues = QueueConstants.QUEUE_BNB_TRANSFER) |
| | | public void bnbTransfer(Long id) { |
| | | log.info("消费转账拨币第一步:{}", id); |
| | | dappSystemService.bnbTransfer(id); |
| | | } |
| | | |
| | | /**转账拨币 |
| | | * @param id |
| | | */ |
| | | @RabbitListener(queues = QueueConstants.QUEUE_BNB_TRANSFER_TEST) |
| | | public void bnbTransferTest(Long id) { |
| | | log.info("消费转账拨币第二步:{}", id); |
| | | dappSystemService.bnbTransferTest(id); |
| | | } |
| | | // |
| | | // /**代理升级 |
| | | // * @param id |
| | | // /** |
| | | // * speed 直推返利 |
| | | // */ |
| | | // @RabbitListener(queues = QueueConstants.QUEUE_BNB_AGENT_UP) |
| | | // public void agentUp(Long id) { |
| | | // log.info("代理升级:{}", id); |
| | | // dappSystemService.agentUp(id); |
| | | // @RabbitListener(queues = QueueConstants.QUEUE_SPEED_DIRECT_PERK) |
| | | // public void speedDirectPerkMsg(Long memberId) { |
| | | // log.info("speedDirectPerkMsg:{}", memberId); |
| | | // try { |
| | | // dappSystemService.speedDirectPerkMsg(memberId); |
| | | // } catch (Exception e) { |
| | | // log.error("speedDirectPerkErr:", e); |
| | | // } |
| | | // } |
| | | // |
| | | // /** |
| | | // * speed 卖出资产 |
| | | // */ |
| | | // @RabbitListener(queues = QueueConstants.QUEUE_SPEED_SALE_PACKAGE) |
| | | // public void speedSalePackageMsg(Long flowId) { |
| | | // log.info("speedSalePackageMsg:{}", flowId); |
| | | // try { |
| | | // dappSystemService.speedSalePackageMsg(flowId); |
| | | // } catch (Exception e) { |
| | | // log.error("speedSalePackageErr:", e); |
| | | // } |
| | | // } |
| | | } |