| | |
| | | |
| | | 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; |
| | |
| | | @Autowired |
| | | private DappSystemService dappSystemService; |
| | | |
| | | @RabbitListener(queues = QueueConstants.ACHIEVE_TREE) |
| | | public void achieveTree(String id) { |
| | | log.info("收到业绩树消息"); |
| | | dappSystemService.achieveTree(Long.parseLong(id)); |
| | | // @RabbitListener(queues = QueueConstants.ACHIEVE_TREE) |
| | | // public void achieveTree(String id) { |
| | | // log.info("收到业绩树消息"); |
| | | // dappSystemService.achieveTree(Long.parseLong(id)); |
| | | // } |
| | | // |
| | | // /** |
| | | // * 生产者在tfc应用 |
| | | // * @param data |
| | | // */ |
| | | // @RabbitListener(queues = QueueConstants.TFC_NEW_PRICE) |
| | | // public void tfcNewPrice(String data) { |
| | | //// dappSystemService.tfcNewPrice(data); |
| | | // } |
| | | // |
| | | // /** |
| | | // * @param data |
| | | // */ |
| | | // @RabbitListener(queues = QueueConstants.DISTRIB_PROFIT) |
| | | // public void feeDistribute(String data) { |
| | | // dappSystemService.feeDistribute(data); |
| | | // } |
| | | |
| | | /**层级奖励分发消息 |
| | | * @param id |
| | | */ |
| | | @RabbitListener(queues = QueueConstants.QUEUE_LEVEL_PROFIT) |
| | | public void levelProfit(Long id) { |
| | | log.info("消费层级奖励分发消息:{}", id); |
| | | dappSystemService.levelProfit(id); |
| | | } |
| | | |
| | | /** |
| | | * 生产者在tfc应用 |
| | | * @param data |
| | | /**计算是否有人出局分发消息 |
| | | * @param id |
| | | */ |
| | | @RabbitListener(queues = QueueConstants.TFC_NEW_PRICE) |
| | | public void tfcNewPrice(String data) { |
| | | // dappSystemService.tfcNewPrice(data); |
| | | @RabbitListener(queues = QueueConstants.QUEUE_MEMBER_OUT) |
| | | public void memberOut(Long id) { |
| | | log.info("消费计算是否有人出局:{}", id); |
| | | dappSystemService.memberOut(id); |
| | | } |
| | | |
| | | /** |
| | | * @param data |
| | | /**转账拨币 |
| | | * @param id |
| | | */ |
| | | @RabbitListener(queues = QueueConstants.DISTRIB_PROFIT) |
| | | public void feeDistribute(String data) { |
| | | dappSystemService.feeDistribute(data); |
| | | @RabbitListener(queues = QueueConstants.QUEUE_BNB_TRANSFER) |
| | | public void bnbTransfer(Long id) { |
| | | log.info("消费转账拨币:{}", id); |
| | | dappSystemService.bnbTransfer(id); |
| | | } |
| | | |
| | | /**代理升级 |
| | | * @param inviteId |
| | | */ |
| | | @RabbitListener(queues = QueueConstants.QUEUE_BNB_AGENT_UP) |
| | | public void agentUp(String inviteId) { |
| | | log.info("代理升级:{}", inviteId); |
| | | dappSystemService.agentUp(inviteId); |
| | | } |
| | | } |