package com.qmth.paper.library.business.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.qmth.paper.library.business.bean.result.BindDetailResult;
import com.qmth.paper.library.business.bean.result.PaperScanTaskDetailResult;
import com.qmth.paper.library.business.bean.result.PaperScanTaskResult;
import com.qmth.paper.library.business.bean.result.SelectResult;
import com.qmth.paper.library.business.entity.PaperScanTask;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 扫描任务表 Mapper 接口
 * </p>
 */
public interface PaperScanTaskMapper extends BaseMapper<PaperScanTask> {

    /**
     * 扫描任务分页查询
     */
    IPage<PaperScanTaskResult> findPaperScanTaskPage(@Param("page") Page<PaperScanTaskResult> page,
                                                     @Param("examId") Long examId,
                                                     @Param("courseCode") String courseCode);

    /**
     * 根据扫描任务id分页查询扫描任务详情
     */
    IPage<PaperScanTaskDetailResult> findPaperScanTaskDetailPageByScanTaskId(@Param("page") Page<PaperScanTaskDetailResult> page,
                                                                             @Param("paperScanTaskId") Long paperScanTaskId);

    void updateScanCount(@Param("paperScanTaskId") Long paperScanTaskId);
}
