package com.qmth.paper.library.business.templete.export;

import com.qmth.paper.library.business.templete.importData.AsyncImportTaskTemplate;
import com.qmth.paper.library.common.util.Result;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Async;

import java.util.Map;

/**
 * @Description: 异步导出模版
 * @Param:
 * @return:
 * @Author: wangliang
 * @Date: 2021/3/29
 */
public abstract class AsyncExportTaskTemplate {

    private final static Logger log = LoggerFactory.getLogger(AsyncImportTaskTemplate.class);
    public static final String BEGIN_TITLE = "->开始准备处理导出的";
    public static final String FINISH_TITLE = "->数据处理结束，共处理了";
    public static final String FINISH_SIZE = "条数据。";
    public static final String EXCEPTION_TITLE = "->数据处理发生异常!";
    public static final String EXCEPTION_DATA = "错误信息:";
    public static final String TXT_PREFIX = ".txt";
    public static final String EXCEPTION_CREATE_TXT_TITLE = "->创建导出日志时发生异常!";

    /**
     * 异步导出任务
     *
     * @param map
     * @return
     */
    @Async
    public abstract Result exportTask(Map<String, Object> map) throws Exception;

    /**
     * 创建txt文件
     *
     * @param tbTask
     */
}
