
package com.lideeyunji.core.framework.config.btncommand.button;

import com.lideeyunji.core.framework.config.btncommand.receiver.IButtonCommandReceiver;
import com.lideeyunji.tool.framework.excel.model.MoreSheetConfig;

import java.util.List;

/**
 * 具体命令-导出按钮命令
 */
public class ExportButtonCommand implements IButtonCommand<List<MoreSheetConfig>> {
    //命令执行者
    private IButtonCommandReceiver<List<MoreSheetConfig>> recevier;

    private String name = "导出数据";

    /**
     * 绑定执行者
     * @param recevier 执行者
     */
    public ExportButtonCommand(IButtonCommandReceiver recevier) {
        this.recevier = recevier;
    }

    /**
     * 执行命令
     * @return
     */
    @Override
    public List<MoreSheetConfig> execute() {
        List<MoreSheetConfig> sheetList = recevier.receiver();
        return sheetList;
    }


}
