package com.jwipc.order.mapper;

import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.jwipc.order.entity.DeliveryOrder;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import com.jwipc.order.model.query.DeliveryOrderQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * 送货单管理 Mapper 接口
 * </p>
 *
 * @author zhangjie
 * @since 2024-03-06
 */
public interface DeliveryOrderMapper extends BaseMapper<DeliveryOrder> {

    List<DeliveryOrder> findList(Page<DeliveryOrder> page,@Param("q") DeliveryOrderQuery query);
    List<DeliveryOrder> findList(@Param("q") DeliveryOrderQuery query);
    /**
     * 更新预约的id查询 预约的送货单有多少明细行
     *
     * @param appointmentIDS 预约记录的ids
     * @return 结果
     */
    List<DeliveryOrder> selectDetailsByAppointmentIds(@Param("appointmentIDS") List<String> appointmentIDS);

    /**
     * 通过送货单查找关联的对账单
     * @param id 送货单id
     * @return 关联的对账单号列表
     */
    List<String> findAccountStatementByOrderCode(@Param("id") Long id);
}
