package com.xindazhou.vehicle.dal.mysql.status;

import com.xindazhou.framework.mybatis.core.mapper.BaseMapperX;
import com.xindazhou.vehicle.dal.dataobject.status.VehicleStatusDO;
import org.apache.ibatis.annotations.Mapper;

/**
 * 车辆状态 Mapper
 *
 * @author xindazhou
 */
@Mapper
public interface VehicleStatusMapper extends BaseMapperX<VehicleStatusDO> {

    /**
     * 根据车辆ID查询车辆状态
     *
     * @param vehicleId 车辆ID
     * @return 车辆状态
     */
    default VehicleStatusDO selectByVehicleId(Long vehicleId) {
        return selectOne(VehicleStatusDO::getVehicleId, vehicleId);
    }

}

