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.TcNetworkEvaluateMapper;
import com.ruoyi.zongzhi.domain.TcNetworkEvaluate;
import com.ruoyi.zongzhi.service.ITcNetworkEvaluateService;

/**
 * 网评Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-10
 */
@Service
public class TcNetworkEvaluateServiceImpl implements ITcNetworkEvaluateService 
{
    @Autowired
    private TcNetworkEvaluateMapper tcNetworkEvaluateMapper;

    /**
     * 查询网评
     * 
     * @param id 网评主键
     * @return 网评
     */
    @Override
    public TcNetworkEvaluate selectTcNetworkEvaluateById(Long id)
    {
        return tcNetworkEvaluateMapper.selectTcNetworkEvaluateById(id);
    }

    /**
     * 查询网评列表
     * 
     * @param tcNetworkEvaluate 网评
     * @return 网评
     */
    @Override
    public List<TcNetworkEvaluate> selectTcNetworkEvaluateList(TcNetworkEvaluate tcNetworkEvaluate)
    {
        return tcNetworkEvaluateMapper.selectTcNetworkEvaluateList(tcNetworkEvaluate);
    }

    /**
     * 新增网评
     * 
     * @param tcNetworkEvaluate 网评
     * @return 结果
     */
    @Override
    public int insertTcNetworkEvaluate(TcNetworkEvaluate tcNetworkEvaluate)
    {
        tcNetworkEvaluate.setCreateTime(DateUtils.getNowDate());
        return tcNetworkEvaluateMapper.insertTcNetworkEvaluate(tcNetworkEvaluate);
    }

    /**
     * 修改网评
     * 
     * @param tcNetworkEvaluate 网评
     * @return 结果
     */
    @Override
    public int updateTcNetworkEvaluate(TcNetworkEvaluate tcNetworkEvaluate)
    {
        tcNetworkEvaluate.setUpdateTime(DateUtils.getNowDate());
        return tcNetworkEvaluateMapper.updateTcNetworkEvaluate(tcNetworkEvaluate);
    }

    /**
     * 批量删除网评
     * 
     * @param ids 需要删除的网评主键
     * @return 结果
     */
    @Override
    public int deleteTcNetworkEvaluateByIds(Long[] ids)
    {
        return tcNetworkEvaluateMapper.deleteTcNetworkEvaluateByIds(ids);
    }

    /**
     * 删除网评信息
     * 
     * @param id 网评主键
     * @return 结果
     */
    @Override
    public int deleteTcNetworkEvaluateById(Long id)
    {
        return tcNetworkEvaluateMapper.deleteTcNetworkEvaluateById(id);
    }
}
