package com.jwipc.order.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwipc.order.entity.AppointmentRecord;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jwipc.order.model.po.AppointmentRecordPO;
import com.jwipc.order.model.po.AppointmentShowPO;
import com.jwipc.order.model.po.DeliveryDetailRecordPO;
import com.jwipc.order.model.query.AppointmentRecordQuery;
import com.jwipc.order.model.query.AppointmentShowTimeQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 送货单预约记录表 Mapper 接口
 * </p>
 *
 * @author WT
 * @since 2024-03-05
 */
public interface AppointmentRecordMapper extends BaseMapper<AppointmentRecord> {
    /**
     * 查询list数据
     * @param query
     * @return
     */
    List<AppointmentRecordPO> findPageByQuery(@Param("query") AppointmentRecordQuery query);

    /**
     * 查询列表
     * @param dbPage
     * @param query
     * @return
     */
    List<AppointmentRecordPO> findPageByQuery(@Param("dbPage") Page<AppointmentRecord> dbPage, @Param("query") AppointmentRecordQuery query);

    /**
     * 仓库预约看板查询
     *
     * @param query 查询条件
     * @return 结果
     */
    List<AppointmentShowPO> appointmentShow(AppointmentShowTimeQuery query);

    List<DeliveryDetailRecordPO> getDeleiveryDetail(@Param("query") AppointmentRecordQuery query);

    List<DeliveryDetailRecordPO> getDeleiveryDetail(@Param("dbPage") Page<AppointmentRecord> dbPage, @Param("query") AppointmentRecordQuery query);
}
