package com.njzscloud.dispose.cst.order.mapper;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.njzscloud.dispose.cst.order.pojo.entity.OrderTransEntity;
import com.njzscloud.dispose.cst.order.pojo.result.OrderTransResult;
import com.njzscloud.dispose.cst.order.pojo.result.SearchOrderTransResult;
import com.njzscloud.dispose.cst.order.pojo.result.TransResult;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * 运输信息
 *
 * @author ljw
 */
@Mapper
public interface OrderTransMapper extends BaseMapper<OrderTransEntity> {

    OrderTransResult getById(Long id);

    IPage<OrderTransResult> paging(Page<Object> page, @Param("ew") QueryWrapper<?> ew);

    /**
     * 根据车牌号查找运输订单
     * @param licensePlate 车牌号
     * @return 运输订单结果
     */
    OrderTransResult getByLicensePlate(@Param("licensePlate") String licensePlate);

    List<TransResult> getTransResultByOrderId(@Param("orderId") Long orderId);

    List<SearchOrderTransResult> listTransRecode(@Param("ew") QueryWrapper<?> ew);
}
