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

import cn.iocoder.yudao.module.course.entity.SchoolCourseOrder;
import cn.iocoder.yudao.module.course.vo.SchoolCommissionVO;
import cn.iocoder.yudao.module.course.vo.SchoolCourseOrderVO;
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;

/**
 * 驾照报名订单 Mapper
 *
 * @author 若依
 */
@Mapper
public interface SchoolCourseOrderMapper extends BaseMapper<SchoolCourseOrder> {

    /**
     * 获得驾照报名订单分页
     *
     * @param entity {@link SchoolCourseOrderVO}
     * @param page      分页参数
     * @return com.baomidou.mybatisplus.core.metadata.IPage<cn.iocoder.yudao.module.course.vo.SchoolCommissionVO>
     * @author PQZ
     * @date 10:11 2025/2/25
     **/
    IPage<SchoolCourseOrderVO> queryPage(@Param("entity")SchoolCourseOrderVO entity, Page<SchoolCommissionVO> page);
    IPage<SchoolCourseOrderVO> queryPageNew(@Param("entity")SchoolCourseOrderVO entity, Page<SchoolCommissionVO> page);

    /**
     *
     * @author vinjor-M
     * @date 14:38 2025/2/25
     * @param coachId 教练userId
     * @param startTime 开始时间
     * @param endTime 结束时间
     * @return java.util.List<cn.iocoder.yudao.module.course.vo.SchoolCourseOrderVO>
    **/
    Double selectByCoachUserId(@Param("coachId")Long coachId,@Param("startTime")String startTime,@Param("endTime")String endTime);


    /** 学员订单信息 */
    SchoolCourseOrderVO getOrderInfo(@Param("userId") Long userId);
}
