package com.ruoyi.project.patrol.dev.service.impl;

import com.ruoyi.project.patrol.dev.domain.TDevAnnihilator;
import com.ruoyi.project.patrol.dev.mapper.TDevAnnihilatorMapper;
import com.ruoyi.project.patrol.dev.service.ITDevAnnihilatorService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 灭火器材Service业务层处理
 *
 * @author ruoyi
 * @date 2023-08-28
 */
@Service
public class TDevAnnihilatorServiceImpl implements ITDevAnnihilatorService
{
    @Autowired
    private TDevAnnihilatorMapper tDevAnnihilatorMapper;

    /**
     * 查询灭火器材
     *
     * @param id 灭火器材主键
     * @return 灭火器材
     */
    @Override
    public TDevAnnihilator selectTDevAnnihilatorById(Long id)
    {
        return tDevAnnihilatorMapper.selectTDevAnnihilatorById(id);
    }

    @Override
    public List<TDevAnnihilator> selectTDevAnnihilatorNum()
    {
        return tDevAnnihilatorMapper.selectTDevAnnihilatorNum();
    }

    /**
     * 查询灭火器材列表
     *
     * @param tDevAnnihilator 灭火器材
     * @return 灭火器材
     */
    @Override
    public List<TDevAnnihilator> selectTDevAnnihilatorList(TDevAnnihilator tDevAnnihilator)
    {
        return tDevAnnihilatorMapper.selectTDevAnnihilatorList(tDevAnnihilator);
    }

    /**
     * 新增灭火器材
     *
     * @param tDevAnnihilator 灭火器材
     * @return 结果
     */
    @Override
    public int insertTDevAnnihilator(TDevAnnihilator tDevAnnihilator)
    {
        return tDevAnnihilatorMapper.insertTDevAnnihilator(tDevAnnihilator);
    }

    /**
     * 修改灭火器材
     *
     * @param tDevAnnihilator 灭火器材
     * @return 结果
     */
    @Override
    public int updateTDevAnnihilator(TDevAnnihilator tDevAnnihilator)
    {
        return tDevAnnihilatorMapper.updateTDevAnnihilator(tDevAnnihilator);
    }

    /**
     * 批量删除灭火器材
     *
     * @param ids 需要删除的灭火器材主键
     * @return 结果
     */
    @Override
    public int deleteTDevAnnihilatorByIds(Long[] ids)
    {
        return tDevAnnihilatorMapper.deleteTDevAnnihilatorByIds(ids);
    }

    /**
     * 删除灭火器材信息
     *
     * @param id 灭火器材主键
     * @return 结果
     */
    @Override
    public int deleteTDevAnnihilatorById(Long id)
    {
        return tDevAnnihilatorMapper.deleteTDevAnnihilatorById(id);
    }
}
