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

import com.ym.mec.biz.dal.dto.UpdateExpectedNumDto;
import com.ym.mec.biz.dal.entity.MusicGroupSubjectPlan;
import com.ym.mec.common.dal.BaseDAO;

import org.apache.ibatis.annotations.Param;

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

public interface MusicGroupSubjectPlanDao extends BaseDAO<Integer, MusicGroupSubjectPlan> {
    /**
     * 获取乐团声部招生计划
     *
     * @param musicGroupId
     * @return
     */
    List<MusicGroupSubjectPlan> getMusicSubjectClassPlan(@Param("musicGroupId") String musicGroupId);


    /**
     * 获取乐团声部报名缴费商品信息
     *
     * @param musicGroupId
     * @param subjectId
     * @return
     */
    MusicGroupSubjectPlan getMusicOneSubjectClassPlan(@Param("musicGroupId") String musicGroupId, @Param("subjectId") int subjectId);

    /**
     * 批量新增乐团声部规划
     * @param musicGroupSubjectPlans
     * @param musicGroupId
     */
    void batchAdd( @Param("subjectPlans") List<MusicGroupSubjectPlan> musicGroupSubjectPlans,@Param("musicGroupId") String musicGroupId);

    /**
     * 删除乐团声部规划
     * @param musicGroupId
     * @return
     */
    int delByMusicGroupId(String musicGroupId);

    /**
     * 修改计划招生人数
     * @param expectedStudentNum
     * @param musicGroupSubjectPlanId
     * @return
     */
    int updateExpectedStudentNum(@Param("expectedStudentNum") Integer expectedStudentNum,@Param("musicGroupSubjectPlanId") Integer musicGroupSubjectPlanId);

    /**
     *
     * @param musicGroupSubjectPlans
     * @return
     */
    int batchUpdateFee(@Param("plans") List<MusicGroupSubjectPlan> musicGroupSubjectPlans);

    /**
     * 根据科目编号和乐团编号获取乐团规划
     * @param musicGroupId
     * @param subjectId
     * @return
     */
    MusicGroupSubjectPlan findSubjectPlan(@Param("musicGroupId") String musicGroupId,@Param("subjectId") Integer subjectId);


    List<Map<Integer, String>> findSubjectMap(@Param("subjectIds") Set<Integer> subjectIds,@Param("musicGroupId") String musicGroupId);
}