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

import cn.iocoder.yudao.module.jx.domain.DriveSchoolCar;
import cn.iocoder.yudao.module.jx.vo.DriveSchoolCarVO;
import cn.iocoder.yudao.module.train.entity.Train;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
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-05-08
 */
@Mapper
public interface DriveSchoolCarMapper extends BaseMapper<DriveSchoolCar>
{
    /**
     * 查询车辆信息
     *
     * @param id 车辆信息主键
     * @return 车辆信息
     */
    public DriveSchoolCar selectDriveSchoolCarById(Long id);

    /**
     * 查询车辆信息列表
     *
     * @param driveSchoolCar 车辆信息
     * @return 车辆信息集合
     */
    public IPage<DriveSchoolCar> selectDriveSchoolCarList(@Param("entity") DriveSchoolCar driveSchoolCar, Page<DriveSchoolCar> page);
    public List<DriveSchoolCar> selectDriveSchoolCarListAll(@Param("entity") DriveSchoolCar driveSchoolCar);

    /**
     * 批量删除车辆信息
     *
     * @param ids 需要删除的数据主键集合
     * @return 结果
     */
    public int deleteDriveSchoolCarByIds(Long[] ids);

    DriveSchoolCar selectByCarNo(String carNo);

    /**
     * app首页查询训练车辆---指定条件下
     * @author vinjor-M
     * @date 15:53 2025/2/19
     * @param coachId 教练ID
     * @param startTime 开始时间
     * @param endTime 截止时间
     * @return java.util.List<cn.iocoder.yudao.module.base.vo.DriveSchoolCar>
     **/
    IPage<DriveSchoolCarVO> selectTrainCar(@Param("coachId")Long coachId, @Param("subject") Integer subject, @Param("startTime") String startTime,
                                           @Param("endTime")String endTime, @Param("searchValue")String searchValue,
                                           @Param("courseType")String courseType, Page<DriveSchoolCarVO> page);

    List<Train> selectTrainStudentList(@Param("coachId")Long coachId, @Param("subject") Integer subject, @Param("startTime") String startTime,
                                @Param("endTime")String endTime, @Param("searchValue")String searchValue,
                                @Param("courseType")String courseType);

    String selectTrainStudent(@Param("coachId")Long coachId, @Param("subject") Integer subject, @Param("startTime") String startTime,
                                         @Param("endTime")String endTime,@Param("searchValue")String searchValue,
                                         @Param("courseType")String courseType);
}
