package com.cpms.project.safety.service.impl;

import com.cpms.project.safety.domain.TSafetyFireExtinguisher;
import com.cpms.project.safety.mapper.TSafetyFireExtinguisherMapper;
import com.cpms.project.safety.service.ITSafetyFireExtinguisherService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 灭火器Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-06-01
 */
@Service
public class TSafetyFireExtinguisherServiceImpl implements ITSafetyFireExtinguisherService
{
    @Autowired
    private TSafetyFireExtinguisherMapper tSafetyFireExtinguisherMapper;

    /**
     * 查询灭火器
     * 
     * @param id 灭火器主键
     * @return 灭火器
     */
    @Override
    public TSafetyFireExtinguisher selectTSafetyFireExtinguisherById(Long id)
    {
        return tSafetyFireExtinguisherMapper.selectTSafetyFireExtinguisherById(id);
    }

    /**
     * 查询灭火器列表
     * 
     * @param tSafetyFireExtinguisher 灭火器
     * @return 灭火器
     */
    @Override
    public List<TSafetyFireExtinguisher> selectTSafetyFireExtinguisherList(TSafetyFireExtinguisher tSafetyFireExtinguisher)
    {
        return tSafetyFireExtinguisherMapper.selectTSafetyFireExtinguisherList(tSafetyFireExtinguisher);
    }

    /**
     * 新增灭火器
     * 
     * @param tSafetyFireExtinguisher 灭火器
     * @return 结果
     */
    @Override
    public int insertTSafetyFireExtinguisher(TSafetyFireExtinguisher tSafetyFireExtinguisher)
    {
        return tSafetyFireExtinguisherMapper.insertTSafetyFireExtinguisher(tSafetyFireExtinguisher);
    }

    /**
     * 修改灭火器
     * 
     * @param tSafetyFireExtinguisher 灭火器
     * @return 结果
     */
    @Override
    public int updateTSafetyFireExtinguisher(TSafetyFireExtinguisher tSafetyFireExtinguisher)
    {
        return tSafetyFireExtinguisherMapper.updateTSafetyFireExtinguisher(tSafetyFireExtinguisher);
    }

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

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