package yangtz.cs.liu.campus.mapper.schoolgrade;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import java.util.Map;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGrade;
import yangtz.cs.liu.campus.domain.schoolgrade.SchoolGradeMentor;
import yangtz.cs.liu.campus.vo.schoolgrade.SchoolGradeMentorVo;
import yangtz.cs.liu.wechat.vo.schoolGrade.SchoolGradeVo;

import java.util.List;

/**
 * 班级管理Mapper接口
 */
@Mapper
public interface SchoolGradeMapper extends BaseMapper<SchoolGrade> {
    List<Long> getGradeId(@Param("userId") Long userId,
                          @Param("schoolYear")int schoolYear);

    List<Long> getMemberGradeId(@Param("userId") Long userId,
                          @Param("schoolYear")int schoolYear);
    List<SchoolGrade> selectGrades(int gradeValue);

    List<Long> getGradeIdsByYear(int schoolYear);


    @Select("SELECT school_year FROM school_grade GROUP BY school_year")
    List<String> selectSchoolYearGruoUp();



    //获取最新学年
    int isNewSchoolYear();
    SchoolGrade selectGradeByName(String name);

    public  List<String>  getYearList();

    List<SchoolGrade> selectNowSchoolGrade();

    public  Long selectDdClassId(String ddClssId);

    String selectUpToYear();
}
