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 deleteAllByOrgan(Long organId);

    /**
     * @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> findAllByOrgan(@Param("organId") Long organId);

}