package com.ruoyi.system.service.impl;

import java.util.List;
import com.ruoyi.common.core.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.RmSwitchInterfaceInfoMapper;
import com.ruoyi.system.domain.RmSwitchInterfaceInfo;
import com.ruoyi.system.service.IRmSwitchInterfaceInfoService;

/**
 * 交换机接口信息Service业务层处理
 * 
 * @author gyt
 * @date 2025-10-10
 */
@Service
public class RmSwitchInterfaceInfoServiceImpl implements IRmSwitchInterfaceInfoService 
{
    @Autowired
    private RmSwitchInterfaceInfoMapper rmSwitchInterfaceInfoMapper;

    /**
     * 查询交换机接口信息
     * 
     * @param id 交换机接口信息主键
     * @return 交换机接口信息
     */
    @Override
    public RmSwitchInterfaceInfo selectRmSwitchInterfaceInfoById(Long id)
    {
        return rmSwitchInterfaceInfoMapper.selectRmSwitchInterfaceInfoById(id);
    }

    /**
     * 查询交换机接口信息列表
     * 
     * @param rmSwitchInterfaceInfo 交换机接口信息
     * @return 交换机接口信息
     */
    @Override
    public List<RmSwitchInterfaceInfo> selectRmSwitchInterfaceInfoList(RmSwitchInterfaceInfo rmSwitchInterfaceInfo)
    {
        return rmSwitchInterfaceInfoMapper.selectRmSwitchInterfaceInfoList(rmSwitchInterfaceInfo);
    }

    /**
     * 新增交换机接口信息
     * 
     * @param rmSwitchInterfaceInfo 交换机接口信息
     * @return 结果
     */
    @Override
    public int insertRmSwitchInterfaceInfo(RmSwitchInterfaceInfo rmSwitchInterfaceInfo)
    {
        rmSwitchInterfaceInfo.setCreateTime(DateUtils.getNowDate());
        return rmSwitchInterfaceInfoMapper.insertRmSwitchInterfaceInfo(rmSwitchInterfaceInfo);
    }

    /**
     * 修改交换机接口信息
     * 
     * @param rmSwitchInterfaceInfo 交换机接口信息
     * @return 结果
     */
    @Override
    public int updateRmSwitchInterfaceInfo(RmSwitchInterfaceInfo rmSwitchInterfaceInfo)
    {
        rmSwitchInterfaceInfo.setUpdateTime(DateUtils.getNowDate());
        return rmSwitchInterfaceInfoMapper.updateRmSwitchInterfaceInfo(rmSwitchInterfaceInfo);
    }

    /**
     * 批量删除交换机接口信息
     * 
     * @param ids 需要删除的交换机接口信息主键
     * @return 结果
     */
    @Override
    public int deleteRmSwitchInterfaceInfoByIds(Long[] ids)
    {
        return rmSwitchInterfaceInfoMapper.deleteRmSwitchInterfaceInfoByIds(ids);
    }

    /**
     * 删除交换机接口信息信息
     * 
     * @param id 交换机接口信息主键
     * @return 结果
     */
    @Override
    public int deleteRmSwitchInterfaceInfoById(Long id)
    {
        return rmSwitchInterfaceInfoMapper.deleteRmSwitchInterfaceInfoById(id);
    }
}
