package com.qmth.paper.library.common.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.service.IService;
import com.qmth.paper.library.common.bean.params.ArraysParams;
import com.qmth.paper.library.common.bean.result.TaskListResult;
import com.qmth.paper.library.common.entity.BasicAttachment;
import com.qmth.paper.library.common.entity.SysUser;
import com.qmth.paper.library.common.entity.TBTask;
import com.qmth.paper.library.common.enums.TaskResultEnum;
import com.qmth.paper.library.common.enums.TaskStatusEnum;
import com.qmth.paper.library.common.enums.TaskTypeEnum;

import java.util.Map;

/**
 * <p>
 * 导入导出任务表 服务类
 * </p>
 *
 * @author wangliang
 * @since 2021-03-19
 */
public interface TBTaskService extends IService<TBTask> {

    /**
     * 保存任务
     */
    public Map<String, Object> saveTask(TaskTypeEnum taskTypeEnum, String remark, SysUser sysUser);

    /**
     * 查询任务列表
     *
     * @param iPage
     * @param status
     * @param type
     * @param result
     * @return
     */
    public IPage<TaskListResult> query(IPage<TaskListResult> iPage,
                                       TaskStatusEnum status,
                                       TaskTypeEnum type,
                                       TaskResultEnum result);

    /**
     * 保存task
     *
     * @param basicAttachment
     * @param taskTypeEnum
     * @param map
     * @param sysUser
     * @return
     */
    public TBTask saveTaskCommon(BasicAttachment basicAttachment, TaskTypeEnum taskTypeEnum, Map map, SysUser sysUser);
}
