package cn.iocoder.yudao.module.asset.dal.mysql.vehicle;

import cn.iocoder.yudao.framework.mybatis.core.mapper.BaseMapperX;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
import cn.iocoder.yudao.module.asset.dal.dataobject.vehicle.VehicleStatusDO;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

/**
 * 车辆状态信息 Mapper
 *
 * @author 芋道源码
 */
@Mapper
public interface VehicleStatusMapper extends BaseMapperX<VehicleStatusDO> {

    default List<VehicleStatusDO> selectByVehicleIds(List<Long> vehicleIds) {
        return selectList(new LambdaQueryWrapperX<VehicleStatusDO>()
                .in(VehicleStatusDO::getVehicleId, vehicleIds));
    }

    default VehicleStatusDO selectByVehicleId(Long vehicleId) {
        return selectOne(new LambdaQueryWrapperX<VehicleStatusDO>()
                .eq(VehicleStatusDO::getVehicleId, vehicleId));
    }

}
