package org.springblade.customer.listener;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import lombok.extern.slf4j.Slf4j;
import org.springblade.customer.dto.FctCsRecordsDTO;
import org.springframework.stereotype.Component;

import java.util.ArrayList;
import java.util.List;
import java.util.Map;

@Slf4j
@Component
public class FctCsRecordsListener extends AnalysisEventListener<FctCsRecordsDTO> {

	public List<FctCsRecordsDTO> list = new ArrayList<FctCsRecordsDTO>();

	public FctCsRecordsListener() {
	}

	@Override
	public void invokeHeadMap(Map<Integer, String> headMap, AnalysisContext context) {
	}

	@Override
	public void invoke(FctCsRecordsDTO t, AnalysisContext analysisContext) {
		Integer rowIndex = analysisContext.readRowHolder().getRowIndex();
		list.add(t);
	}

	@Override
	public void doAfterAllAnalysed(AnalysisContext analysisContext) {
	}


}
