package com.xxfc.platform.vehicle.mapper;

import com.xxfc.platform.vehicle.entity.VehicleUpkeepLog;
import com.xxfc.platform.vehicle.pojo.VehicleUpkeepLogItemVo;
import com.xxfc.platform.vehicle.pojo.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);

    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);

    void insertUpkeepLogItmes(VehicleUpkeepLogVo upkeepItems);
}