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

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

import java.util.List;

public interface ClassGroupStudentMapperDao extends BaseDAO<Long, ClassGroupStudentMapper> {

	/**
	 * 批量插入学生
	 * @param classGroupStudentMapperList
	 * @return
	 */
	int classGroupStudentsInsert(@Param("classGroupStudentMapperList") List<ClassGroupStudentMapper> classGroupStudentMapperList);

	/**
	 * 根据班级和学生编号查询
	 * @param classGroupId
	 * @param userId
	 * @return
	 */
	ClassGroupStudentMapper query(@Param("classGroupId") int classGroupId, @Param("userId") Integer userId);

	/**
	 * 根据乐团编号删除指定学生
	 * @param musicGroupId 乐团编号
	 * @param userId 学生编号
	 * @return
	 */
	int deleteStudentByMusicGroupId(@Param("musicGroupId") String musicGroupId, @Param("userId") Integer userId);

	/**
	 * 根据班级编号删除关联
	 * @param classGroupId
	 */
	void deleteByClassId(Integer classGroupId);

	/**
	 * @Author: Joburgess
	 * @Date: 2019/10/17
	 * @params [classGroupId, userId]
	 * @return int
	 * @describe 删除班级上的指定学生
	 */
	int deleteStudentByClassGroupId(@Param("classGroupId") Long classGroupId,@Param("userId") Long userId);
}