package com.zhongshu.card.server.core.listener;

import com.github.microservice.auth.client.event.auth.OrganizationApplicationEvent;
import com.github.microservice.auth.client.type.AuthEventType;
import lombok.extern.slf4j.Slf4j;
import org.springframework.context.ApplicationListener;
import org.springframework.stereotype.Component;

@Slf4j
@Component
public class OrganizationEventListener implements ApplicationListener<OrganizationApplicationEvent> {

    @Override
    public void onApplicationEvent(OrganizationApplicationEvent event) {
        String epId = event.getStreamModel().getParameter().getId();
        AuthEventType eventType = event.getStreamModel().getParameter().getEventType();
        log.info("OrganizationEventListener {} {}", epId, eventType);
        // 初始
        if(eventType == AuthEventType.Add) {

        }
    }
}
