package com.qmth.exam.reserve.dao;

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.exam.reserve.bean.stdapply.CategoryVO;
import com.qmth.exam.reserve.bean.student.StudentInfo;
import com.qmth.exam.reserve.bean.student.StudentReq;
import com.qmth.exam.reserve.bean.student.StudentVO;
import com.qmth.exam.reserve.entity.StudentEntity;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StudentDao extends BaseMapper<StudentEntity> {

    List<StudentEntity> listNoFinishStudent(@Param("taskId") Long taskId, @Param("cancel") Boolean cancel);

    StudentInfo findInfoById(@Param("studentId") Long studentId);

    List<CategoryVO> listNoFinishCategory(@Param("taskId") Long taskId, @Param("cancel") Boolean cancel);

    IPage<StudentVO> pageStudent(Page<StudentVO> page, @Param("req") StudentReq req);

    void updateStudentApplyNumber(@Param("studentId") Long studentId);
}
