

package com.yami.shop.service;

import cn.hutool.core.date.DateTime;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yami.shop.bean.app.dto.OrderCountData;
import com.yami.shop.bean.app.dto.ShopCartOrderMergerDto;
import com.yami.shop.bean.model.ExportTask;
import com.yami.shop.bean.model.Order;
import com.yami.shop.bean.model.OrderItem;
import com.yami.shop.bean.model.OrderRefund;
import com.yami.shop.bean.param.*;
import com.yami.shop.bean.vo.ExportContext;
import com.yami.shop.bean.vo.ExportTaskVo;
import com.yami.shop.bean.vo.OrderCountVo;
import com.yami.shop.common.util.PageParam;
import com.yami.shop.common.util.R;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
import java.util.Date;
import java.util.List;
import java.util.Map;

/**
 * @author lgh on 2018/09/15.
 */
public interface ExportTaskService extends IService<ExportTask> {


    ExportTask findByUserIdAndStatusAndType(Long userId, int exportStatus, int exportType);

    void downloadFile(HttpServletRequest request, HttpServletResponse response, String fileId, Long userId)  throws IOException;

    void putTaskId(String taskId, ExportContext context);

    void removeTaskId(String taskId);

    R<String> cancelExport(String fileId, Long userId);

    IPage<ExportTaskVo> findPage(PageParam<ExportTaskVo> page,Long userId,Integer exportType);
}
