package com.ruoyi.project.ehs.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.ehs.mapper.TFireextinguisherMapper;
import com.ruoyi.project.ehs.domain.TFireextinguisher;
import com.ruoyi.project.ehs.service.ITFireextinguisherService;

import javax.annotation.Resource;

/**
 * 灭火器Service业务层处理
 *
 * @author ruoyi
 * @date 2020-11-25
 */
@Service
public class TFireextinguisherServiceImpl implements ITFireextinguisherService
{
    @Resource
    private TFireextinguisherMapper tFireextinguisherMapper;

    /**
     * 查询灭火器
     *
     * @param id 灭火器ID
     * @return 灭火器
     */
    @Override
    public TFireextinguisher selectTFireextinguisherById(Long id)
    {
        return tFireextinguisherMapper.selectTFireextinguisherById(id);
    }

    /**
     * 查询灭火器列表
     *
     * @param tFireextinguisher 灭火器
     * @return 灭火器
     */
    @Override
    public List<TFireextinguisher> selectTFireextinguisherList(TFireextinguisher tFireextinguisher)
    {
        return tFireextinguisherMapper.selectTFireextinguisherList(tFireextinguisher);
    }

    /**
     * 定时任务查询灭火器列表
     *
     * @param tFireextinguisher 灭火器
     * @return 灭火器集合
     */
    @Override
    public List<TFireextinguisher> selectList(TFireextinguisher tFireextinguisher) {
        return tFireextinguisherMapper.selectList(tFireextinguisher);
    }


    /**
     * 新增灭火器
     *
     * @param tFireextinguisher 灭火器
     * @return 结果
     */
    @Override
    public int insertTFireextinguisher(TFireextinguisher tFireextinguisher)
    {
        return tFireextinguisherMapper.insertTFireextinguisher(tFireextinguisher);
    }

    /**
     * 修改灭火器
     *
     * @param tFireextinguisher 灭火器
     * @return 结果
     */
    @Override
    public int updateTFireextinguisher(TFireextinguisher tFireextinguisher)
    {
        return tFireextinguisherMapper.updateTFireextinguisher(tFireextinguisher);
    }

    /**
     * 批量删除灭火器
     *
     * @param ids 需要删除的灭火器ID
     * @return 结果
     */
    @Override
    public int deleteTFireextinguisherByIds(Long[] ids)
    {
        return tFireextinguisherMapper.deleteTFireextinguisherByIds(ids);
    }

    /**
     * 删除灭火器信息
     *
     * @param id 灭火器ID
     * @return 结果
     */
    @Override
    public int deleteTFireextinguisherById(Long id)
    {
        return tFireextinguisherMapper.deleteTFireextinguisherById(id);
    }
}
