package com.sptg.estate.biz.receiver;

import com.sptg.permissions.api.entity.Organization;
import com.sptg.permissions.api.stream.OrgDeleteReceiverInterface;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.stereotype.Component;

/**
 * title: OrgDeleteConsume
 * description: 机构删除消费者
 *
 *                  
 *            
 */
@Component
@Slf4j
@RequiredArgsConstructor
@EnableBinding(value = { OrgDeleteReceiverInterface.class})
public class OrgDeleteReceiver {

    @StreamListener(value = "org_del_channel_input")
    public void input(Organization org){
        log.warn("这个[" + org.getName() + "]机构被删除了");
    }

}
