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

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.dcsoft.system.car.mapper.TbCarRecordMapper;
import com.dcsoft.system.car.domain.TbCarRecord;
import com.dcsoft.system.car.service.ITbCarRecordService;

/**
 * 车辆通行记录Service业务层处理
 *
 * @author nichun
 * @date 2023-07-26
 */
@Service
public class TbCarRecordServiceImpl implements ITbCarRecordService
{
    @Autowired
    private TbCarRecordMapper tbCarRecordMapper;

    /**
     * 查询车辆通行记录
     *
     * @param id 车辆通行记录主键
     * @return 车辆通行记录
     */
    @Override
    public TbCarRecord selectTbCarRecordById(Long id)
    {
        return tbCarRecordMapper.selectTbCarRecordById(id);
    }

    /**
     * 查询车辆通行记录列表
     *
     * @param tbCarRecord 车辆通行记录
     * @return 车辆通行记录
     */
    @Override
    public List<TbCarRecord> selectTbCarRecordList(TbCarRecord tbCarRecord)
    {
        return tbCarRecordMapper.selectTbCarRecordList(tbCarRecord);
    }

    /**
     * 新增车辆通行记录
     *
     * @param tbCarRecord 车辆通行记录
     * @return 结果
     */
    @Override
    public int insertTbCarRecord(TbCarRecord tbCarRecord)
    {
        return tbCarRecordMapper.insertTbCarRecord(tbCarRecord);
    }

    /**
     * 修改车辆通行记录
     *
     * @param tbCarRecord 车辆通行记录
     * @return 结果
     */
    @Override
    public int updateTbCarRecord(TbCarRecord tbCarRecord)
    {
        return tbCarRecordMapper.updateTbCarRecord(tbCarRecord);
    }

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

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