package com.yida.data.user.service;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yida.data.common.core.entity.user.EduStudentApply;
import com.yida.data.user.dto.ListStudentApplyDTO;
import com.yida.data.user.vo.StudentApplyImportProgressVO;
import com.yida.data.user.vo.StudentApplyImportVO;
import com.yida.data.user.vo.StudentApplyStatusVO;
import java.io.IOException;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import org.springframework.scheduling.annotation.Async;
import org.springframework.web.multipart.MultipartFile;

public interface EduStudentApplyService extends IService<EduStudentApply> {

    /**
     * 获取详情
     */
    StudentApplyStatusVO getStudentApplyStatus(Long studentId, String applyCode);

    /**
     * 分页查询
     */
    IPage<EduStudentApply> listStudentApply(ListStudentApplyDTO dto, Page<EduStudentApply> page);

    void saveStudentApply(EduStudentApply eduStudentApply);

    /**
     * 下载学生开通应用模板
     *
     * @param response
     * @throws Exception
     */
    void downloadTemplate(HttpServletResponse response) throws Exception;

    /**
     * 导入
     */
    @Async
    void importStudentApplyInfo(MultipartFile file, String redisKey) throws IOException;

    /**
     * 插入
     */
    void insertStudentApplyData(List<StudentApplyImportVO> studentApplyImportVOList, String redisKey);

    /**
     * 获取导入进度
     */
    StudentApplyImportProgressVO getImportStudentApplyInfoProgress(String redisKey);

}
