package com.jwipc.order.service;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwipc.order.entity.AppointmentTime;
import com.baomidou.mybatisplus.extension.service.IService;
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 java.util.List;

/**
 * <p>
 * 预约时间范围数据配置 服务类
 * </p>
 *
 * @author WT
 * @since 2024-03-05
 */
public interface IAppointmentTimeService extends IService<AppointmentTime> {
    /**
     * 查询列表数据
     * @param dbPage
     * @param query
     * @return
     */
    List<AppointmentTimePO> findPageByQuery(Page<AppointmentTime> dbPage, AppointmentTimeQuery query);

    /**
     * 查询列表数据
     * @param query
     * @return
     */
    List<AppointmentTime2PO> getTimeRangeData(AppointmentRecordQuery query);
    /**
     * 校验预约时间是否小于当前时间
     *
     * @param selectDay     选择日期
     * @param appointmentId 预约的时间端数据
     * @return 预约时间 大于当前时间 true  否则false
     */
    boolean checkAppointmentTime(String selectDay, Long appointmentId);
}
