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

import com.ym.mec.biz.dal.dto.StudentDemoGroupListDto;
import com.ym.mec.biz.dal.entity.CourseSchedule;
import com.ym.mec.biz.dal.entity.DemoGroup;
import com.ym.mec.common.dal.BaseDAO;
import org.apache.ibatis.annotations.Param;

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

public interface DemoGroupDao extends BaseDAO<Long, DemoGroup> {

    /**
     * @Author: Joburgess
     * @Date: 2019/9/25
     * 根据试听课ID获取班级中学生的分部ID列表
     */
    List<Integer> organIdListByDemoGroupId(Long demoGroupId);

    /**
     * @Author: Joburgess
     * @Date: 2019/9/25
     * 根据用户ID获取所在部门ID
     */
    Integer getOrganIdByUserId(Long userId);

    /**
     * @Author: Joburgess
     * @Date: 2019/9/25
     * 根据试听课信息构造课程计划
     */
    List<CourseSchedule> createCourseScheduleByDemoGroup(@Param("demoGroup") DemoGroup demoGroup);

    /**
     * @Author: Joburgess
     * @Date: 2019/9/25
     * 统计乐团已报名人数
     */
    Integer countDemoGroupStudents(Long demoGroupId);

    /**
     * @Author: Joburgess
     * @Date: 2019/9/25
     * 试听课列表获取
     */
    List<StudentDemoGroupListDto> findDemoGroupList(Map<String,Object> params);

    /**
     * @Author: Joburgess
     * @Date: 2019/9/25
     * 统计试听课
     */
    Integer countDemoGroupList(Map<String,Object> params);

    /**
     * @Author: Joburgess
     * @Date: 2019/9/25
     * 根据试听课ID获取关联班级ID
     */
    Integer findClassGroupIDByDemoGroupId(Long demoGroupId);
	
}