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

import java.util.List;

import com.dcsoft.system.vehicle.domain.CarPassRecord;
import com.dcsoft.system.vehicle.mapper.CarPassRecordMapper;
import com.dcsoft.system.vehicle.service.ICarPassRecordService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;


/**
 * 通行记录Service业务层处理
 *
 * @author nichun
 * @date 2024-01-03
 */
@Service
public class CarPassRecordServiceImpl implements ICarPassRecordService
{
    @Autowired
    private CarPassRecordMapper carPassRecordMapper;

    /**
     * 查询通行记录
     *
     * @param id 通行记录主键
     * @return 通行记录
     */
    @Override
    public CarPassRecord selectCarPassRecordById(Long id)
    {
        return carPassRecordMapper.selectCarPassRecordById(id);
    }

    /**
     * 查询通行记录列表
     *
     * @param carPassRecord 通行记录
     * @return 通行记录
     */
    @Override
    public List<CarPassRecord> selectCarPassRecordList(CarPassRecord carPassRecord)
    {
        return carPassRecordMapper.selectCarPassRecordList(carPassRecord);
    }

    /**
     * 新增通行记录
     *
     * @param carPassRecord 通行记录
     * @return 结果
     */
    @Override
    public int insertCarPassRecord(CarPassRecord carPassRecord)
    {
        return carPassRecordMapper.insertCarPassRecord(carPassRecord);
    }

    /**
     * 修改通行记录
     *
     * @param carPassRecord 通行记录
     * @return 结果
     */
    @Override
    public int updateCarPassRecord(CarPassRecord carPassRecord)
    {
        return carPassRecordMapper.updateCarPassRecord(carPassRecord);
    }

    /**
     * 批量删除通行记录
     *
     * @param ids 需要删除的通行记录主键
     * @return 结果
     */
    @Override
    public int deleteCarPassRecordByIds(Long[] ids)
    {
        return carPassRecordMapper.deleteCarPassRecordByIds(ids);
    }

    /**
     * 删除通行记录信息
     *
     * @param id 通行记录主键
     * @return 结果
     */
    @Override
    public int deleteCarPassRecordById(Long id)
    {
        return carPassRecordMapper.deleteCarPassRecordById(id);
    }
}
