package com.qmth.exam.reserve.template.upload;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.scheduling.annotation.Async;

import java.io.File;
import java.util.Map;

/**
 * @Description 异步文件上传模板类
 */
public abstract class AsyncUploadTaskTemplate {

    private final static Logger log = LoggerFactory.getLogger(AsyncUploadTaskTemplate.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 EXCEPTION_CREATE_TXT_TITLE = "->上传时发生异常!";

    @Async
    public abstract void uploadTask(Map<String, Object> map, File file) throws Exception;
}
