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.TcNetworkReportMapper;
import com.ruoyi.zongzhi.domain.TcNetworkReport;
import com.ruoyi.zongzhi.service.ITcNetworkReportService;

/**
 * 网络举报Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-10
 */
@Service
public class TcNetworkReportServiceImpl implements ITcNetworkReportService 
{
    @Autowired
    private TcNetworkReportMapper tcNetworkReportMapper;

    /**
     * 查询网络举报
     * 
     * @param id 网络举报主键
     * @return 网络举报
     */
    @Override
    public TcNetworkReport selectTcNetworkReportById(Long id)
    {
        return tcNetworkReportMapper.selectTcNetworkReportById(id);
    }

    /**
     * 查询网络举报列表
     * 
     * @param tcNetworkReport 网络举报
     * @return 网络举报
     */
    @Override
    public List<TcNetworkReport> selectTcNetworkReportList(TcNetworkReport tcNetworkReport)
    {
        return tcNetworkReportMapper.selectTcNetworkReportList(tcNetworkReport);
    }

    /**
     * 新增网络举报
     * 
     * @param tcNetworkReport 网络举报
     * @return 结果
     */
    @Override
    public int insertTcNetworkReport(TcNetworkReport tcNetworkReport)
    {
        tcNetworkReport.setCreateTime(DateUtils.getNowDate());
        return tcNetworkReportMapper.insertTcNetworkReport(tcNetworkReport);
    }

    /**
     * 修改网络举报
     * 
     * @param tcNetworkReport 网络举报
     * @return 结果
     */
    @Override
    public int updateTcNetworkReport(TcNetworkReport tcNetworkReport)
    {
        tcNetworkReport.setUpdateTime(DateUtils.getNowDate());
        return tcNetworkReportMapper.updateTcNetworkReport(tcNetworkReport);
    }

    /**
     * 批量删除网络举报
     * 
     * @param ids 需要删除的网络举报主键
     * @return 结果
     */
    @Override
    public int deleteTcNetworkReportByIds(Long[] ids)
    {
        return tcNetworkReportMapper.deleteTcNetworkReportByIds(ids);
    }

    /**
     * 删除网络举报信息
     * 
     * @param id 网络举报主键
     * @return 结果
     */
    @Override
    public int deleteTcNetworkReportById(Long id)
    {
        return tcNetworkReportMapper.deleteTcNetworkReportById(id);
    }
}
