package com.dcsoft.system.vehicle.service.impl;

import com.dcsoft.system.vehicle.domain.CarParkItem;
import com.dcsoft.system.vehicle.mapper.CarParkItemMapper;
import com.dcsoft.system.vehicle.service.ICarParkItemService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;


/**
 * 车场设备信息Service业务层处理
 *
 * @author nichun
 * @date 2023-12-28
 */
@Service
public class CarParkItemServiceImpl implements ICarParkItemService
{
    @Autowired
    private CarParkItemMapper carParkItemMapper;

    /**
     * 查询车场设备信息
     *
     * @param id 车场设备信息主键
     * @return 车场设备信息
     */
    @Override
    public CarParkItem selectCarParkItemById(Long id)
    {
        return carParkItemMapper.selectCarParkItemById(id);
    }

    /**
     * 查询车场设备信息列表
     *
     * @param carParkItem 车场设备信息
     * @return 车场设备信息
     */
    @Override
    public List<CarParkItem> selectCarParkItemList(CarParkItem carParkItem)
    {
        return carParkItemMapper.selectCarParkItemList(carParkItem);
    }

    /**
     * 新增车场设备信息
     *
     * @param carParkItem 车场设备信息
     * @return 结果
     */
    @Override
    public int insertCarParkItem(CarParkItem carParkItem)
    {
        return carParkItemMapper.insertCarParkItem(carParkItem);
    }

    /**
     * 修改车场设备信息
     *
     * @param carParkItem 车场设备信息
     * @return 结果
     */
    @Override
    public int updateCarParkItem(CarParkItem carParkItem)
    {
        return carParkItemMapper.updateCarParkItem(carParkItem);
    }

    /**
     * 批量删除车场设备信息
     *
     * @param ids 需要删除的车场设备信息主键
     * @return 结果
     */
    @Override
    public int deleteCarParkItemByIds(Long[] ids)
    {
        return carParkItemMapper.deleteCarParkItemByIds(ids);
    }

    /**
     * 删除车场设备信息信息
     *
     * @param id 车场设备信息主键
     * @return 结果
     */
    @Override
    public int deleteCarParkItemById(Long id)
    {
        return carParkItemMapper.deleteCarParkItemById(id);
    }

    @Override
    public int deleteParkItemByParkId(Long parkId) {
        return carParkItemMapper.deleteParkItemByParkId(parkId);
    }
}
