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

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

import java.util.List;

public interface VipGroupDefaultClassesCycleDao extends BaseDAO<Integer, VipGroupDefaultClassesCycle> {


    VipGroupDefaultClassesCycle checkMaxClassTimes(Integer maxClassTimes);

    int batchInstert(List<VipGroupDefaultClassesCycle> vipGroupDefaultClassesCycles);

    int deleteAll();

    /**
     * @Author: Joburgess
     * @Date: 2019/10/8
     * @params [maxClassTimes]
     * @return com.ym.mec.biz.dal.entity.VipGroupDefaultClassesCycle
     * @describe 根据最大课次获取上一梯度信息
     */
    VipGroupDefaultClassesCycle findByMaxClassTimes(Integer maxClassTimes);


    VipGroupDefaultClassesCycle findByMinClassTimes(Integer minClassTimes);

    int countAll();

    List<VipGroupDefaultClassesCycle> findAllCycle();

    /**
     * @describe 根据乐团获取指定课次课排课范围
     * @author Joburgess
     * @date 2019/10/29
     * @param classTimes: 课次
     * @return com.ym.mec.biz.dal.entity.VipGroupDefaultClassesCycle
     */
    VipGroupDefaultClassesCycle findByOrganAndClassTimes(@Param("classTimes") Integer classTimes);

}
