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

import java.util.List;
import java.util.Map;

import com.dcsoft.system.vehicle.domain.CarPassGather;
import com.dcsoft.system.vehicle.mapper.CarPassGatherMapper;
import com.dcsoft.system.vehicle.service.ICarPassGatherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 在场记录Service业务层处理
 *
 * @author nichun
 * @date 2024-01-08
 */
@Service
public class CarPassGatherServiceImpl implements ICarPassGatherService
{
    @Autowired
    private CarPassGatherMapper carPassGatherMapper;

    /**
     * 查询在场记录
     *
     * @param id 在场记录主键
     * @return 在场记录
     */
    @Override
    public CarPassGather selectCarPassGatherById(Long id)
    {
        return carPassGatherMapper.selectCarPassGatherById(id);
    }

    /**
     * 查询在场记录列表
     *
     * @param carPassGather 在场记录
     * @return 在场记录
     */
    @Override
    public List<CarPassGather> selectCarPassGatherList(CarPassGather carPassGather)
    {
        return carPassGatherMapper.selectCarPassGatherList(carPassGather);
    }

    /**
     * 新增在场记录
     *
     * @param carPassGather 在场记录
     * @return 结果
     */
    @Override
    public int insertCarPassGather(CarPassGather carPassGather)
    {
        return carPassGatherMapper.insertCarPassGather(carPassGather);
    }

    /**
     * 修改在场记录
     *
     * @param carPassGather 在场记录
     * @return 结果
     */
    @Override
    public int updateCarPassGather(CarPassGather carPassGather)
    {
        return carPassGatherMapper.updateCarPassGather(carPassGather);
    }

    /**
     * 批量删除在场记录
     *
     * @param ids 需要删除的在场记录主键
     * @return 结果
     */
    @Override
    public int deleteCarPassGatherByIds(Long[] ids)
    {
        return carPassGatherMapper.deleteCarPassGatherByIds(ids);
    }

    /**
     * 删除在场记录信息
     *
     * @param id 在场记录主键
     * @return 结果
     */
    @Override
    public int deleteCarPassGatherById(Long id)
    {
        return carPassGatherMapper.deleteCarPassGatherById(id);
    }

    @Override
    public List<Map<String, Object>> parkTop(Long parkId) {
        return carPassGatherMapper.parkTop(parkId);
    }
}
