package com.ym.mec.biz.service;

import com.ym.mec.biz.dal.dto.ClassGroupTeachersDto;
import com.ym.mec.biz.dal.entity.ClassGroupTeacherMapper;
import com.ym.mec.biz.dal.entity.CourseSchedule;
import com.ym.mec.common.service.BaseService;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;
import java.util.Set;

public interface ClassGroupTeacherMapperService extends BaseService<Long, ClassGroupTeacherMapper> {

    /**
     * 批量插入班级老师
     * @param classGroupTeacherMapperList
     * @return
     */
    int classGroupTeachersInsert(List<ClassGroupTeacherMapper> classGroupTeacherMapperList);

    int classGroupTeachersInsert(List<ClassGroupTeacherMapper> classGroupTeacherMapperList,boolean checkCourser);

    /**
     * 查询班级老师
     *
     * @param classGroupList
     * @return
     */
    List<ClassGroupTeacherMapper> findClassGroupTeachers(List<ClassGroupTeachersDto> classGroupList);

    /**
     * 批量更新教师薪酬
     * @param classGroupTeacherMapperList
     * @return
     */
    boolean classGroupTeacherMapperUpdate(List<ClassGroupTeacherMapper> classGroupTeacherMapperList);

    void createMusicGroupTeacherMapper(List<CourseSchedule> courseSchedules,String musicGroupId);

    /**
     * @describe 创建乐团课单节课对应教师课酬
     * @author Joburgess
     * @date 2019/10/24
     * @param courseSchedules: 课程计划列表
     * @return void
     */
    void createCourseScheduleTeacherSalary(List<CourseSchedule> courseSchedules, Map<Long, CourseSchedule> oldCourseSchedules);

    /**
     * @describe 初始化课程课酬，课酬为0
     * @author Joburgess
     * @date 2020.09.21
     * @param courseSchedules:
     * @return void
     */
    void initCourseScheduleTeacherSalary(List<CourseSchedule> courseSchedules, List<ClassGroupTeacherMapper> classGroupTeacherMapperList);

    /**
     * 获取班级老师
     * @param classGroupId
     * @return
     */
    List<ClassGroupTeacherMapper> getClassGroupTeachers(Integer classGroupId);

    /**
     * 获取班级老师
     * @param classGroupId
     * @return
     */
    ClassGroupTeacherMapper getClassGroupTeachersRole(Integer classGroupId,String teacherRole);

    /**
     * 修改班级老师
     * @param groupId
     * @param groupType
     * @param teacherId
     */
    void updateTeacher(String groupId, Integer teacherId,String groupType);

    /**
     * 批量修改班级关联的老师
     * @param classGroupIds
     * @param newTeacherId
     */
    void batchUpdateTeacherByClassId(List<Integer> classGroupIds, Integer oldTeacherId,Integer newTeacherId);
}
