KKSU
2025-01-03 f185d83c7a25c8ece24336fd889a09472d526688
src/main/java/cc/mrbird/febs/rabbit/consumer/AgentConsumer.java
@@ -6,6 +6,7 @@
import lombok.extern.slf4j.Slf4j;
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;
/**
@@ -14,6 +15,7 @@
 **/
@Slf4j
@Component
@ConditionalOnProperty(prefix = "consumer", name = "open", havingValue = "true")
public class AgentConsumer {
    @Autowired
    private IAgentService agentService;
@@ -45,4 +47,17 @@
    }
    /**
     * 节点升级
     */
    @RabbitListener(queues = QueueConstants.RUN_VIP_NODE_UP)
    public void nodeUpMsg(Long memberId) {
        try {
            agentService.nodeUpMsg(memberId);
        } catch (Exception e) {
            log.error("消费节点升级异常", e);
        }
    }
}