package com.xinxincaravan.caravan.vehicle.mapper;

import com.xinxincaravan.caravan.vehicle.entity.VehicleUpkeepLog;
import com.xinxincaravan.caravan.vehicle.vo.VehicleUpkeepLogItemVo;
import com.xinxincaravan.caravan.vehicle.vo.VehicleUpkeepLogVo;
import org.apache.ibatis.annotations.Param;
import tk.mybatis.mapper.common.Mapper;

import java.util.List;

public interface VehicleUpkeepLogMapper extends Mapper<VehicleUpkeepLog> {
    List<VehicleUpkeepLogVo> selectVoAll(@Param("numberPlate") String numberPlate,@Param("companyList")List<Integer> companyList);

    VehicleUpkeepLogVo selectVoById(Integer id);

    int addItems(@Param("id") Integer id, @Param("upkeepItems") List<Integer> upkeepItems);

    List<VehicleUpkeepLogItemVo> getItemsByLogId(Integer id);

    int deleteItemsByLogId(Integer id);

    VehicleUpkeepLog selectLastByVehicleId(String vehicleId);
}