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.TcDengbaoSystemMapper;
import com.ruoyi.zongzhi.domain.TcDengbaoSystem;
import com.ruoyi.zongzhi.service.ITcDengbaoSystemService;

/**
 * 等保系统Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-10
 */
@Service
public class TcDengbaoSystemServiceImpl implements ITcDengbaoSystemService 
{
    @Autowired
    private TcDengbaoSystemMapper tcDengbaoSystemMapper;

    /**
     * 查询等保系统
     * 
     * @param id 等保系统主键
     * @return 等保系统
     */
    @Override
    public TcDengbaoSystem selectTcDengbaoSystemById(Long id)
    {
        return tcDengbaoSystemMapper.selectTcDengbaoSystemById(id);
    }

    /**
     * 查询等保系统列表
     * 
     * @param tcDengbaoSystem 等保系统
     * @return 等保系统
     */
    @Override
    public List<TcDengbaoSystem> selectTcDengbaoSystemList(TcDengbaoSystem tcDengbaoSystem)
    {
        return tcDengbaoSystemMapper.selectTcDengbaoSystemList(tcDengbaoSystem);
    }

    /**
     * 新增等保系统
     * 
     * @param tcDengbaoSystem 等保系统
     * @return 结果
     */
    @Override
    public int insertTcDengbaoSystem(TcDengbaoSystem tcDengbaoSystem)
    {
        tcDengbaoSystem.setCreateTime(DateUtils.getNowDate());
        return tcDengbaoSystemMapper.insertTcDengbaoSystem(tcDengbaoSystem);
    }

    /**
     * 修改等保系统
     * 
     * @param tcDengbaoSystem 等保系统
     * @return 结果
     */
    @Override
    public int updateTcDengbaoSystem(TcDengbaoSystem tcDengbaoSystem)
    {
        tcDengbaoSystem.setUpdateTime(DateUtils.getNowDate());
        return tcDengbaoSystemMapper.updateTcDengbaoSystem(tcDengbaoSystem);
    }

    /**
     * 批量删除等保系统
     * 
     * @param ids 需要删除的等保系统主键
     * @return 结果
     */
    @Override
    public int deleteTcDengbaoSystemByIds(Long[] ids)
    {
        return tcDengbaoSystemMapper.deleteTcDengbaoSystemByIds(ids);
    }

    /**
     * 删除等保系统信息
     * 
     * @param id 等保系统主键
     * @return 结果
     */
    @Override
    public int deleteTcDengbaoSystemById(Long id)
    {
        return tcDengbaoSystemMapper.deleteTcDengbaoSystemById(id);
    }
}
