package com.ruoyi.asset.service.impl;

import java.util.List;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.asset.mapper.TbFaultReportMapper;
import com.ruoyi.asset.domain.TbFaultReport;
import com.ruoyi.asset.service.ITbFaultReportService;

/**
 * 故障报备Service业务层处理
 * 
 * @author 原动力
 * @date 2023-03-27
 */
@Service
public class TbFaultReportServiceImpl extends ServiceImpl<TbFaultReportMapper, TbFaultReport> implements ITbFaultReportService
{
    @Autowired
    private TbFaultReportMapper tbFaultReportMapper;

    /**
     * 查询故障报备
     * 
     * @param id 故障报备主键
     * @return 故障报备
     */
    @Override
    public TbFaultReport selectTbFaultReportById(Long id)
    {
        return tbFaultReportMapper.selectTbFaultReportById(id);
    }

    /**
     * 查询故障报备列表
     * 
     * @param tbFaultReport 故障报备
     * @return 故障报备
     */
    @Override
    public List<TbFaultReport> selectTbFaultReportList(TbFaultReport tbFaultReport)
    {
        return tbFaultReportMapper.selectTbFaultReportList(tbFaultReport);
    }

    /**
     * 新增故障报备
     * 
     * @param tbFaultReport 故障报备
     * @return 结果
     */
    @Override
    public int insertTbFaultReport(TbFaultReport tbFaultReport)
    {
        return tbFaultReportMapper.insertTbFaultReport(tbFaultReport);
    }

    /**
     * 修改故障报备
     * 
     * @param tbFaultReport 故障报备
     * @return 结果
     */
    @Override
    public int updateTbFaultReport(TbFaultReport tbFaultReport)
    {
        return tbFaultReportMapper.updateTbFaultReport(tbFaultReport);
    }

    /**
     * 批量删除故障报备
     * 
     * @param ids 需要删除的故障报备主键
     * @return 结果
     */
    @Override
    public int deleteTbFaultReportByIds(Long[] ids)
    {
        return tbFaultReportMapper.deleteTbFaultReportByIds(ids);
    }

    /**
     * 删除故障报备信息
     * 
     * @param id 故障报备主键
     * @return 结果
     */
    @Override
    public int deleteTbFaultReportById(Long id)
    {
        return tbFaultReportMapper.deleteTbFaultReportById(id);
    }
}
