package com.yida.data.user.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yida.data.common.core.entity.system.Dept;
import com.yida.data.common.core.entity.user.EduStaff;
import com.yida.data.common.core.entity.user.EduTeacherDept;
import com.yida.data.common.core.entity.user.EduUserDept;
import com.yida.data.user.vo.TeacherClassVO;
import com.yida.data.user.vo.TeacherCourseInfoVO;

import java.util.List;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

@Mapper
public interface EduTeacherDeptMapper extends BaseMapper<EduTeacherDept> {


    List<Dept> listPermissionDeptByTeacher(Long teacherSysId);

    List<EduStaff> listTeacherByClass(@Param("classIds") List<Long> classIds,
                                      @Param("teacherName") String teacherName);

    List<EduStaff> listTeacherBySchool(@Param("schoolId") Long schoolId,
                                       @Param("name") String name);

    List<Integer> findType(@Param("teacherId") Long teacherId);

    /**
     * asdf
     *
     * @param teacherId
     * @return
     */


    List<Dept> findGroupDeptType(@Param("teacherId") Long teacherId);

    List<EduUserDept> selectDeptList(@Param("teacherId") Long teacherId);


    List<Long> selectCoursetList(@Param("teacherId") Long teacherId, @Param("schoolId") Long schoolId,
                                 @Param("classId") Long classId);

    List<Long> findClassId(@Param("teacherId") Long teacherId);

    List<TeacherCourseInfoVO> listTeacherCourseByGrade(@Param("gradeId") Long gradeId,
                                                       @Param("classId") Long classId);

    /**
     * 根据班级和名称查询教师
     */
    List<EduStaff> listTeacherByClassAndName(@Param("classId") Long classId,
                                             @Param("name") String name);

    /**
     * 查询教师管辖班级
     *
     * @param teacherId
     * @return
     */
    List<TeacherClassVO> listTeacherClass(Long teacherId);


    /**
     * 查询教师部门
     *
     * @param teacherIds
     * @return
     */
    List<EduTeacherDept> listTeacherDept(List<Long> teacherIds);

    /**
     * 教师数量
     *
     * @param schoolId 学校id
     * @return long
     * @author ZYJ
     * @date 2023/4/24 16:59
     */
    long countTeacherNumber(@Param("schoolId") Long schoolId);
}
