package com.ruoyi.zongzhi.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.zongzhi.mapper.TcNetworkSupportUnitMapper;
import com.ruoyi.zongzhi.domain.TcNetworkSupportUnit;
import com.ruoyi.zongzhi.service.ITcNetworkSupportUnitService;

/**
 * 网络安全支持单位Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-10
 */
@Service
public class TcNetworkSupportUnitServiceImpl implements ITcNetworkSupportUnitService 
{
    @Autowired
    private TcNetworkSupportUnitMapper tcNetworkSupportUnitMapper;

    /**
     * 查询网络安全支持单位
     * 
     * @param id 网络安全支持单位主键
     * @return 网络安全支持单位
     */
    @Override
    public TcNetworkSupportUnit selectTcNetworkSupportUnitById(Long id)
    {
        return tcNetworkSupportUnitMapper.selectTcNetworkSupportUnitById(id);
    }

    /**
     * 查询网络安全支持单位列表
     * 
     * @param tcNetworkSupportUnit 网络安全支持单位
     * @return 网络安全支持单位
     */
    @Override
    public List<TcNetworkSupportUnit> selectTcNetworkSupportUnitList(TcNetworkSupportUnit tcNetworkSupportUnit)
    {
        return tcNetworkSupportUnitMapper.selectTcNetworkSupportUnitList(tcNetworkSupportUnit);
    }

    /**
     * 新增网络安全支持单位
     * 
     * @param tcNetworkSupportUnit 网络安全支持单位
     * @return 结果
     */
    @Override
    public int insertTcNetworkSupportUnit(TcNetworkSupportUnit tcNetworkSupportUnit)
    {
        tcNetworkSupportUnit.setCreateTime(DateUtils.getNowDate());
        return tcNetworkSupportUnitMapper.insertTcNetworkSupportUnit(tcNetworkSupportUnit);
    }

    /**
     * 修改网络安全支持单位
     * 
     * @param tcNetworkSupportUnit 网络安全支持单位
     * @return 结果
     */
    @Override
    public int updateTcNetworkSupportUnit(TcNetworkSupportUnit tcNetworkSupportUnit)
    {
        tcNetworkSupportUnit.setUpdateTime(DateUtils.getNowDate());
        return tcNetworkSupportUnitMapper.updateTcNetworkSupportUnit(tcNetworkSupportUnit);
    }

    /**
     * 批量删除网络安全支持单位
     * 
     * @param ids 需要删除的网络安全支持单位主键
     * @return 结果
     */
    @Override
    public int deleteTcNetworkSupportUnitByIds(Long[] ids)
    {
        return tcNetworkSupportUnitMapper.deleteTcNetworkSupportUnitByIds(ids);
    }

    /**
     * 删除网络安全支持单位信息
     * 
     * @param id 网络安全支持单位主键
     * @return 结果
     */
    @Override
    public int deleteTcNetworkSupportUnitById(Long id)
    {
        return tcNetworkSupportUnitMapper.deleteTcNetworkSupportUnitById(id);
    }
}
