package com.ruoyi.manage.service.impl;

import com.ruoyi.common.utils.DateUtils;
import com.ruoyi.manage.domain.NetworkManage;
import com.ruoyi.manage.mapper.NetworkManageMapper;
import com.ruoyi.manage.service.INetworkManageService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * 网络管理Service业务层处理
 * 
 * @author boman
 * @date 2025-05-07
 */
@Service
public class NetworkManageServiceImpl implements INetworkManageService 
{
    @Autowired
    private NetworkManageMapper networkManageMapper;

    /**
     * 查询网络管理
     * 
     * @param networkId 网络管理主键
     * @return 网络管理
     */
    @Override
    public NetworkManage selectNetworkManageByNetworkId(Long networkId)
    {
        return networkManageMapper.selectNetworkManageByNetworkId(networkId);
    }

    /**
     * 查询网络管理列表
     * 
     * @param networkManage 网络管理
     * @return 网络管理
     */
    @Override
    public List<NetworkManage> selectNetworkManageList(NetworkManage networkManage)
    {
        return networkManageMapper.selectNetworkManageList(networkManage);
    }

    /**
     * 新增网络管理
     * 
     * @param networkManage 网络管理
     * @return 结果
     */
    @Override
    public int insertNetworkManage(NetworkManage networkManage)
    {
        networkManage.setCreateTime(DateUtils.getNowDate());
        return networkManageMapper.insertNetworkManage(networkManage);
    }

    /**
     * 修改网络管理
     * 
     * @param networkManage 网络管理
     * @return 结果
     */
    @Override
    public int updateNetworkManage(NetworkManage networkManage)
    {
        networkManage.setUpdateTime(DateUtils.getNowDate());
        return networkManageMapper.updateNetworkManage(networkManage);
    }

    /**
     * 批量删除网络管理
     * 
     * @param networkIds 需要删除的网络管理主键
     * @return 结果
     */
    @Override
    public int deleteNetworkManageByNetworkIds(Long[] networkIds)
    {
        return networkManageMapper.deleteNetworkManageByNetworkIds(networkIds);
    }

    /**
     * 删除网络管理信息
     * 
     * @param networkId 网络管理主键
     * @return 结果
     */
    @Override
    public int deleteNetworkManageByNetworkId(Long networkId)
    {
        return networkManageMapper.deleteNetworkManageByNetworkId(networkId);
    }
}
