package com.yinlihupo.enlish.service.domain.mapper;

import com.yinlihupo.enlish.service.domain.dataobject.StudentDO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface StudentDOMapper {

    List<StudentDO> selectStudentDOListByClassIdAndGradeId(@Param("classId") Integer classId, @Param("gradeId") Integer gradeId, @Param("name") String name, @Param("startIndex") Integer startIndex, @Param("pageSize") Integer pageSize);

    int selectStudentCount();

    StudentDO selectStudentById(Integer id);

    List<StudentDO> selectStudentDOListByIds(@Param("ids") List<Integer> ids);

    void insert(StudentDO studentDO);

    // 逻辑删除
    void deleteById(Integer id);

    int selectStudentCountByClassId(@Param("classId") Integer classId);

    int updateStudentActualGradeId(@Param("studentId") Integer studentId, @Param("gradeId") Integer gradeId);

    List<StudentDO> selectStudentDOListByClassId(@Param("classId") Integer classId);

    List<StudentDO> selectStudentDOListByGradeId(@Param("gradeId") Integer gradeId);

    List<StudentDO> selectStudentDOListByName(@Param("name") String name);
}