package com.ym.mec.biz.dal.dao;


import com.ym.mec.biz.dal.entity.ClassGroupTeacherSalary;
import com.ym.mec.biz.dal.enums.GroupType;
import com.ym.mec.common.dal.BaseDAO;
import org.apache.ibatis.annotations.Param;

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

public interface ClassGroupTeacherSalaryDao extends BaseDAO<Long, ClassGroupTeacherSalary> {

    /**
     * 获取乐团老师课酬配置
     * @param musicGroupId
     * @return
     */
    List<ClassGroupTeacherSalary> findByMusicGroupId(@Param("musicGroupId") String musicGroupId);

    /**
     * @describe 获取班级与老师课酬
     * @author Joburgess
     * @date 2019/11/11
     * @param vipGroupId: vip课编号
     * @param teacherId: 老师编号
     * @return com.ym.mec.biz.dal.entity.ClassGroupTeacherSalary
     */
    ClassGroupTeacherSalary findByVipGoupAndTeacher(@Param("vipGroupId") Integer vipGroupId,
                                                    @Param("teacherId") Integer teacherId);

    /**
     * @describe 根据班级获取老师课酬
     * @author Joburgess
     * @date 2019/11/22
     * @param classGroupId: 班级编号
     * @param teacherId: 教师编号
     * @return com.ym.mec.biz.dal.entity.ClassGroupTeacherSalary
     */
    ClassGroupTeacherSalary findByClassGroupAndTeacher(@Param("classGroupId") Integer classGroupId,
                                                       @Param("teacherId") Integer teacherId);

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

    /**
     * @describe 根据团体删除班级
     * @author Joburgess
     * @date 2020/2/17
     * @param groupId:
     * @param groupType:
     * @return int
     */
    int deleteByGroup(@Param("groupId") String groupId,
                      @Param("groupType") GroupType groupType);
}
