package com.ruoyi.fire.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.fire.mapper.FireFacilityRepairMapper;
import com.ruoyi.fire.domain.FireFacilityRepair;
import com.ruoyi.fire.service.IFireFacilityRepairService;

/**
 * 消防设施维修记录Service业务层处理
 * 
 * @author Junhua
 * @date 2025-07-16
 */
@Service
public class FireFacilityRepairServiceImpl implements IFireFacilityRepairService 
{
    @Autowired
    private FireFacilityRepairMapper fireFacilityRepairMapper;

    /**
     * 查询消防设施维修记录
     * 
     * @param id 消防设施维修记录主键
     * @return 消防设施维修记录
     */
    @Override
    public FireFacilityRepair selectFireFacilityRepairById(Long id)
    {
        return fireFacilityRepairMapper.selectFireFacilityRepairById(id);
    }

    /**
     * 查询消防设施维修记录列表
     * 
     * @param fireFacilityRepair 消防设施维修记录
     * @return 消防设施维修记录
     */
    @Override
    public List<FireFacilityRepair> selectFireFacilityRepairList(FireFacilityRepair fireFacilityRepair)
    {
        return fireFacilityRepairMapper.selectFireFacilityRepairList(fireFacilityRepair);
    }

    /**
     * 新增消防设施维修记录
     * 
     * @param fireFacilityRepair 消防设施维修记录
     * @return 结果
     */
    @Override
    public int insertFireFacilityRepair(FireFacilityRepair fireFacilityRepair)
    {
        fireFacilityRepair.setCreateTime(DateUtils.getNowDate());
        return fireFacilityRepairMapper.insertFireFacilityRepair(fireFacilityRepair);
    }

    /**
     * 修改消防设施维修记录
     * 
     * @param fireFacilityRepair 消防设施维修记录
     * @return 结果
     */
    @Override
    public int updateFireFacilityRepair(FireFacilityRepair fireFacilityRepair)
    {
        return fireFacilityRepairMapper.updateFireFacilityRepair(fireFacilityRepair);
    }

    /**
     * 批量删除消防设施维修记录
     * 
     * @param ids 需要删除的消防设施维修记录主键
     * @return 结果
     */
    @Override
    public int deleteFireFacilityRepairByIds(Long[] ids)
    {
        return fireFacilityRepairMapper.deleteFireFacilityRepairByIds(ids);
    }

    /**
     * 删除消防设施维修记录信息
     * 
     * @param id 消防设施维修记录主键
     * @return 结果
     */
    @Override
    public int deleteFireFacilityRepairById(Long id)
    {
        return fireFacilityRepairMapper.deleteFireFacilityRepairById(id);
    }
}
