| | |
| | | |
| | | import cc.mrbird.febs.dapp.service.DappSystemService; |
| | | import cc.mrbird.febs.rabbit.QueueConstants; |
| | | 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; |
| | |
| | | @Autowired |
| | | private DappSystemService dappSystemService; |
| | | |
| | | @RabbitListener(queues = QueueConstants.ONLINE_TRANSFER) |
| | | public void onlineTransfer(String batchNo) { |
| | | log.info("收到链上转账消息:{}", batchNo); |
| | | dappSystemService.onlineTransfer(batchNo); |
| | | @RabbitListener(queues = QueueConstants.ACHIEVE_TREE) |
| | | public void achieveTree(String id) { |
| | | log.info("收到业绩树消息"); |
| | | return; |
| | | // todo |
| | | // 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 distrbProfit(String id) { |
| | | log.info("收到滑点分配消息:{}", id); |
| | | dappSystemService.tradeProfitDistribute(Long.parseLong(id)); |
| | | public void feeDistribute(String data) { |
| | | dappSystemService.feeDistribute(data); |
| | | } |
| | | } |