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.PortOpeningMapper;
import com.zyc.system.domain.PortOpening;
import com.zyc.system.service.IPortOpeningService;

/**
 * 端口开放Service业务层处理
 * 
 * @author zyc
 * @date 2024-12-26
 */
@Service
public class PortOpeningServiceImpl implements IPortOpeningService 
{
    @Autowired
    private PortOpeningMapper portOpeningMapper;

    /**
     * 查询端口开放
     * 
     * @param id 端口开放主键
     * @return 端口开放
     */
    @Override
    public PortOpening selectPortOpeningById(Integer id)
    {
        return portOpeningMapper.selectPortOpeningById(id);
    }

    /**
     * 查询端口开放列表
     * 
     * @param portOpening 端口开放
     * @return 端口开放
     */
    @Override
    public List<PortOpening> selectPortOpeningList(PortOpening portOpening)
    {
        return portOpeningMapper.selectPortOpeningList(portOpening);
    }

    /**
     * 新增端口开放
     * 
     * @param portOpening 端口开放
     * @return 结果
     */
    @Override
    public int insertPortOpening(PortOpening portOpening)
    {
        return portOpeningMapper.insertPortOpening(portOpening);
    }

    /**
     * 修改端口开放
     * 
     * @param portOpening 端口开放
     * @return 结果
     */
    @Override
    public int updatePortOpening(PortOpening portOpening)
    {
        return portOpeningMapper.updatePortOpening(portOpening);
    }

    /**
     * 批量删除端口开放
     * 
     * @param ids 需要删除的端口开放主键
     * @return 结果
     */
    @Override
    public int deletePortOpeningByIds(Integer[] ids)
    {
        return portOpeningMapper.deletePortOpeningByIds(ids);
    }

    /**
     * 删除端口开放信息
     * 
     * @param id 端口开放主键
     * @return 结果
     */
    @Override
    public int deletePortOpeningById(Integer id)
    {
        return portOpeningMapper.deletePortOpeningById(id);
    }
}
