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.TcExtworkSafetyadminMapper;
import com.ruoyi.zongzhi.domain.TcExtworkSafetyadmin;
import com.ruoyi.zongzhi.service.ITcExtworkSafetyadminService;

/**
 * 网络安全官Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-10
 */
@Service
public class TcExtworkSafetyadminServiceImpl implements ITcExtworkSafetyadminService 
{
    @Autowired
    private TcExtworkSafetyadminMapper tcExtworkSafetyadminMapper;

    /**
     * 查询网络安全官
     * 
     * @param id 网络安全官主键
     * @return 网络安全官
     */
    @Override
    public TcExtworkSafetyadmin selectTcExtworkSafetyadminById(Long id)
    {
        return tcExtworkSafetyadminMapper.selectTcExtworkSafetyadminById(id);
    }

    /**
     * 查询网络安全官列表
     * 
     * @param tcExtworkSafetyadmin 网络安全官
     * @return 网络安全官
     */
    @Override
    public List<TcExtworkSafetyadmin> selectTcExtworkSafetyadminList(TcExtworkSafetyadmin tcExtworkSafetyadmin)
    {
        return tcExtworkSafetyadminMapper.selectTcExtworkSafetyadminList(tcExtworkSafetyadmin);
    }

    /**
     * 新增网络安全官
     * 
     * @param tcExtworkSafetyadmin 网络安全官
     * @return 结果
     */
    @Override
    public int insertTcExtworkSafetyadmin(TcExtworkSafetyadmin tcExtworkSafetyadmin)
    {
        tcExtworkSafetyadmin.setCreateTime(DateUtils.getNowDate());
        return tcExtworkSafetyadminMapper.insertTcExtworkSafetyadmin(tcExtworkSafetyadmin);
    }

    /**
     * 修改网络安全官
     * 
     * @param tcExtworkSafetyadmin 网络安全官
     * @return 结果
     */
    @Override
    public int updateTcExtworkSafetyadmin(TcExtworkSafetyadmin tcExtworkSafetyadmin)
    {
        tcExtworkSafetyadmin.setUpdateTime(DateUtils.getNowDate());
        return tcExtworkSafetyadminMapper.updateTcExtworkSafetyadmin(tcExtworkSafetyadmin);
    }

    /**
     * 批量删除网络安全官
     * 
     * @param ids 需要删除的网络安全官主键
     * @return 结果
     */
    @Override
    public int deleteTcExtworkSafetyadminByIds(Long[] ids)
    {
        return tcExtworkSafetyadminMapper.deleteTcExtworkSafetyadminByIds(ids);
    }

    /**
     * 删除网络安全官信息
     * 
     * @param id 网络安全官主键
     * @return 结果
     */
    @Override
    public int deleteTcExtworkSafetyadminById(Long id)
    {
        return tcExtworkSafetyadminMapper.deleteTcExtworkSafetyadminById(id);
    }
}
