package com.jwipc.order.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwipc.order.entity.AppointmentTime;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jwipc.order.model.po.AppointmentTime2PO;
import com.jwipc.order.model.po.AppointmentTimePO;
import com.jwipc.order.model.query.AppointmentRecordQuery;
import com.jwipc.order.model.query.AppointmentTimeQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 预约时间范围数据配置 Mapper 接口
 * </p>
 *
 * @author WT
 * @since 2024-03-05
 */
public interface AppointmentTimeMapper extends BaseMapper<AppointmentTime> {
    /**
     * 查询列表 不分页
     * @param query
     * @return
     */
    List<AppointmentTimePO> findPageByQuery(@Param("query") AppointmentTimeQuery query);

    /**
     * 查询列表 分页
     * @param dbPage
     * @param query
     * @return
     */
    List<AppointmentTimePO> findPageByQuery(@Param("dbPage") Page<AppointmentTime> dbPage, @Param("query") AppointmentTimeQuery query);

    /**
     * 查询数据
     * @param query
     * @return
     */
    List<AppointmentTime2PO> getTimeRangeData(AppointmentRecordQuery query);
}
