package com.phm.manage.service.impl;

import com.phm.manage.domain.FaultCase;
import com.phm.manage.mapper.FaultCaseMapper;
import com.phm.manage.service.IFaultCaseService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 故障案例信息Service业务层处理
 *
 * @author phm
 * @date 2023-08-22
 */
@Service
public class FaultCaseServiceImpl implements IFaultCaseService {
    @Autowired
    private FaultCaseMapper faultCaseMapper;

    /**
     * 查询故障案例信息
     *
     * @param id 故障案例信息主键
     * @return 故障案例信息
     */
    @Override
    public FaultCase selectFaultCaseById(Long id) {
        return faultCaseMapper.selectFaultCaseById(id);
    }

    /**
     * 查询故障案例信息列表
     *
     * @param faultCase 故障案例信息
     * @return 故障案例信息
     */
    @Override
    public List<FaultCase> selectFaultCaseList(FaultCase faultCase) {
        return faultCaseMapper.selectFaultCaseList(faultCase);
    }

    /**
     * 新增故障案例信息
     *
     * @param faultCase 故障案例信息
     * @return 结果
     */
    @Override
    public int insertFaultCase(FaultCase faultCase) {
        return faultCaseMapper.insertFaultCase(faultCase);
    }

    /**
     * 修改故障案例信息
     *
     * @param faultCase 故障案例信息
     * @return 结果
     */
    @Override
    public int updateFaultCase(FaultCase faultCase) {
        return faultCaseMapper.updateFaultCase(faultCase);
    }

    /**
     * 批量删除故障案例信息
     *
     * @param ids 需要删除的故障案例信息主键
     * @return 结果
     */
    @Override
    public int deleteFaultCaseByIds(Long[] ids) {
        return faultCaseMapper.deleteFaultCaseByIds(ids);
    }

    /**
     * 删除故障案例信息信息
     *
     * @param id 故障案例信息主键
     * @return 结果
     */
    @Override
    public int deleteFaultCaseById(Long id) {
        return faultCaseMapper.deleteFaultCaseById(id);
    }
}
