package cn.iocoder.yudao.module.jx.mapper;


import cn.iocoder.yudao.module.jx.domain.DriveSchoolReservationCourse;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 预约练车Mapper接口
 *
 * @author ruoyi
 * @date 2024-04-08
 */
@Mapper
public interface DriveSchoolReservationCourseMapper
{
    /**
     * 查询预约练车
     *
     * @param id 预约练车主键
     * @return 预约练车
     */
    public DriveSchoolReservationCourse selectDriveSchoolReservationCourseById(Long id);

    /**
     * 查询预约练车列表
     *
     * @param driveSchoolReservationCourse 预约练车
     * @return 预约练车集合
     */
    public IPage<DriveSchoolReservationCourse> selectDriveSchoolReservationCourseList(@Param("entity") DriveSchoolReservationCourse driveSchoolReservationCourse, Page<DriveSchoolReservationCourse> page);

    /**
     * 新增预约练车
     *
     * @param driveSchoolReservationCourse 预约练车
     * @return 结果
     */
    public int insertDriveSchoolReservationCourse(DriveSchoolReservationCourse driveSchoolReservationCourse);

    /**
     * 修改预约练车
     *
     * @param driveSchoolReservationCourse 预约练车
     * @return 结果
     */
    public int updateDriveSchoolReservationCourse(DriveSchoolReservationCourse driveSchoolReservationCourse);

    /**
     * 删除预约练车
     *
     * @param id 预约练车主键
     * @return 结果
     */
    public int deleteDriveSchoolReservationCourseById(Long id);

    /**
     * 批量删除预约练车
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteDriveSchoolReservationCourseByIds(Long[] ids);

    List<DriveSchoolReservationCourse> findCourseByCurrentTimeAndJlName(@Param("currentDate") String currentDate, @Param("jlId") Long jlId);

    void insertBookingInfo(
            @Param("userId") Long userId, @Param("currentDate") String currentDate, @Param("period") Integer period, @Param("instructorName") String instructorName);

    List<DriveSchoolReservationCourse> findCourseByUserId(Long userId);

    void updateCourseById(DriveSchoolReservationCourse driveSchoolReservationCourse);

    Integer getReservationNumber(Long deptId);
    Integer getReservationNumberThree(Long deptId);

    Integer getIsRecdNumber(Long deptId);
    Integer getPaydNumber(Long deptId);
    Integer getSignedNumber(Long deptId);

    IPage<DriveSchoolReservationCourse> getReservationCourseList(Page page,@Param("deptId") Long deptId);

    public List<DriveSchoolReservationCourse>  selectDriveSchoolReservationGetListUser(DriveSchoolReservationCourse driveSchoolReservationCourse);

    DriveSchoolReservationCourse getDriveTime(Long deptId);

    List<DriveSchoolReservationCourse> getOftenDriveStudents(Long userId);

    Integer getReservationNumberByUserId(Long userId);

    List<DriveSchoolReservationCourse> getReservationCourseListByUserId(Long userId);
    List<DriveSchoolReservationCourse> getAppReservationCourseListByUserId(DriveSchoolReservationCourse driveSchoolReservationCourse);
    List<DriveSchoolReservationCourse> getAppReservationCourseListByUserIds(DriveSchoolReservationCourse driveSchoolReservationCourse);

    int updateDriveSchoolReservationCourseByCoach(DriveSchoolReservationCourse driveSchoolReservationCourse);
}
