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.TcNetworkVolunteerMapper;
import com.ruoyi.zongzhi.domain.TcNetworkVolunteer;
import com.ruoyi.zongzhi.service.ITcNetworkVolunteerService;

/**
 * 网络文明自愿者Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-10
 */
@Service
public class TcNetworkVolunteerServiceImpl implements ITcNetworkVolunteerService 
{
    @Autowired
    private TcNetworkVolunteerMapper tcNetworkVolunteerMapper;

    /**
     * 查询网络文明自愿者
     * 
     * @param id 网络文明自愿者主键
     * @return 网络文明自愿者
     */
    @Override
    public TcNetworkVolunteer selectTcNetworkVolunteerById(Long id)
    {
        return tcNetworkVolunteerMapper.selectTcNetworkVolunteerById(id);
    }

    /**
     * 查询网络文明自愿者列表
     * 
     * @param tcNetworkVolunteer 网络文明自愿者
     * @return 网络文明自愿者
     */
    @Override
    public List<TcNetworkVolunteer> selectTcNetworkVolunteerList(TcNetworkVolunteer tcNetworkVolunteer)
    {
        return tcNetworkVolunteerMapper.selectTcNetworkVolunteerList(tcNetworkVolunteer);
    }

    /**
     * 新增网络文明自愿者
     * 
     * @param tcNetworkVolunteer 网络文明自愿者
     * @return 结果
     */
    @Override
    public int insertTcNetworkVolunteer(TcNetworkVolunteer tcNetworkVolunteer)
    {
        return tcNetworkVolunteerMapper.insertTcNetworkVolunteer(tcNetworkVolunteer);
    }

    /**
     * 修改网络文明自愿者
     * 
     * @param tcNetworkVolunteer 网络文明自愿者
     * @return 结果
     */
    @Override
    public int updateTcNetworkVolunteer(TcNetworkVolunteer tcNetworkVolunteer)
    {
        tcNetworkVolunteer.setUpdateTime(DateUtils.getNowDate());
        return tcNetworkVolunteerMapper.updateTcNetworkVolunteer(tcNetworkVolunteer);
    }

    /**
     * 批量删除网络文明自愿者
     * 
     * @param ids 需要删除的网络文明自愿者主键
     * @return 结果
     */
    @Override
    public int deleteTcNetworkVolunteerByIds(Long[] ids)
    {
        return tcNetworkVolunteerMapper.deleteTcNetworkVolunteerByIds(ids);
    }

    /**
     * 删除网络文明自愿者信息
     * 
     * @param id 网络文明自愿者主键
     * @return 结果
     */
    @Override
    public int deleteTcNetworkVolunteerById(Long id)
    {
        return tcNetworkVolunteerMapper.deleteTcNetworkVolunteerById(id);
    }
}
