package com.zyc.system.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.zyc.system.mapper.ComputerRoomsMapper;
import com.zyc.system.domain.ComputerRooms;
import com.zyc.system.service.IComputerRoomsService;

/**
 * 机房Service业务层处理
 * 
 * @author zyc
 * @date 2024-12-26
 */
@Service
public class ComputerRoomsServiceImpl implements IComputerRoomsService 
{
    @Autowired
    private ComputerRoomsMapper computerRoomsMapper;

    /**
     * 查询机房
     * 
     * @param id 机房主键
     * @return 机房
     */
    @Override
    public ComputerRooms selectComputerRoomsById(Integer id)
    {
        return computerRoomsMapper.selectComputerRoomsById(id);
    }

    /**
     * 查询机房列表
     * 
     * @param computerRooms 机房
     * @return 机房
     */
    @Override
    public List<ComputerRooms> selectComputerRoomsList(ComputerRooms computerRooms)
    {
        return computerRoomsMapper.selectComputerRoomsList(computerRooms);
    }

    /**
     * 新增机房
     * 
     * @param computerRooms 机房
     * @return 结果
     */
    @Override
    public int insertComputerRooms(ComputerRooms computerRooms)
    {
        return computerRoomsMapper.insertComputerRooms(computerRooms);
    }

    /**
     * 修改机房
     * 
     * @param computerRooms 机房
     * @return 结果
     */
    @Override
    public int updateComputerRooms(ComputerRooms computerRooms)
    {
        return computerRoomsMapper.updateComputerRooms(computerRooms);
    }

    /**
     * 批量删除机房
     * 
     * @param ids 需要删除的机房主键
     * @return 结果
     */
    @Override
    public int deleteComputerRoomsByIds(Integer[] ids)
    {
        return computerRoomsMapper.deleteComputerRoomsByIds(ids);
    }

    /**
     * 删除机房信息
     * 
     * @param id 机房主键
     * @return 结果
     */
    @Override
    public int deleteComputerRoomsById(Integer id)
    {
        return computerRoomsMapper.deleteComputerRoomsById(id);
    }
}
