package com.bocloud.ims.service.utils;

import com.alibaba.excel.context.AnalysisContext;
import com.alibaba.excel.event.AnalysisEventListener;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;

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

/**
 * @Author hya
 * @Date 2022/3/9 10:10
 */
@Data
@Slf4j
public class ImportExcelListener<T> extends AnalysisEventListener<T> {
    private List<T> list = new ArrayList<>();

    @Override
    public void invoke(T data, AnalysisContext analysisContext) {
        list.add(data);
    }

    @Override
    public void doAfterAllAnalysed(AnalysisContext analysisContext) {
    }
}
