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.TcNetworkMqPrincipalMapper;
import com.ruoyi.zongzhi.domain.TcNetworkMqPrincipal;
import com.ruoyi.zongzhi.service.ITcNetworkMqPrincipalService;

/**
 * 网络民情责任人Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-10
 */
@Service
public class TcNetworkMqPrincipalServiceImpl implements ITcNetworkMqPrincipalService 
{
    @Autowired
    private TcNetworkMqPrincipalMapper tcNetworkMqPrincipalMapper;

    /**
     * 查询网络民情责任人
     * 
     * @param id 网络民情责任人主键
     * @return 网络民情责任人
     */
    @Override
    public TcNetworkMqPrincipal selectTcNetworkMqPrincipalById(Long id)
    {
        return tcNetworkMqPrincipalMapper.selectTcNetworkMqPrincipalById(id);
    }

    /**
     * 查询网络民情责任人列表
     * 
     * @param tcNetworkMqPrincipal 网络民情责任人
     * @return 网络民情责任人
     */
    @Override
    public List<TcNetworkMqPrincipal> selectTcNetworkMqPrincipalList(TcNetworkMqPrincipal tcNetworkMqPrincipal)
    {
        return tcNetworkMqPrincipalMapper.selectTcNetworkMqPrincipalList(tcNetworkMqPrincipal);
    }

    /**
     * 新增网络民情责任人
     * 
     * @param tcNetworkMqPrincipal 网络民情责任人
     * @return 结果
     */
    @Override
    public int insertTcNetworkMqPrincipal(TcNetworkMqPrincipal tcNetworkMqPrincipal)
    {
        tcNetworkMqPrincipal.setCreateTime(DateUtils.getNowDate());
        return tcNetworkMqPrincipalMapper.insertTcNetworkMqPrincipal(tcNetworkMqPrincipal);
    }

    /**
     * 修改网络民情责任人
     * 
     * @param tcNetworkMqPrincipal 网络民情责任人
     * @return 结果
     */
    @Override
    public int updateTcNetworkMqPrincipal(TcNetworkMqPrincipal tcNetworkMqPrincipal)
    {
        tcNetworkMqPrincipal.setUpdateTime(DateUtils.getNowDate());
        return tcNetworkMqPrincipalMapper.updateTcNetworkMqPrincipal(tcNetworkMqPrincipal);
    }

    /**
     * 批量删除网络民情责任人
     * 
     * @param ids 需要删除的网络民情责任人主键
     * @return 结果
     */
    @Override
    public int deleteTcNetworkMqPrincipalByIds(Long[] ids)
    {
        return tcNetworkMqPrincipalMapper.deleteTcNetworkMqPrincipalByIds(ids);
    }

    /**
     * 删除网络民情责任人信息
     * 
     * @param id 网络民情责任人主键
     * @return 结果
     */
    @Override
    public int deleteTcNetworkMqPrincipalById(Long id)
    {
        return tcNetworkMqPrincipalMapper.deleteTcNetworkMqPrincipalById(id);
    }
}
