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.TcNetworkPingtaiMapper;
import com.ruoyi.zongzhi.domain.TcNetworkPingtai;
import com.ruoyi.zongzhi.service.ITcNetworkPingtaiService;

/**
 * 网络平台Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-10
 */
@Service
public class TcNetworkPingtaiServiceImpl implements ITcNetworkPingtaiService 
{
    @Autowired
    private TcNetworkPingtaiMapper tcNetworkPingtaiMapper;

    /**
     * 查询网络平台
     * 
     * @param id 网络平台主键
     * @return 网络平台
     */
    @Override
    public TcNetworkPingtai selectTcNetworkPingtaiById(Long id)
    {
        return tcNetworkPingtaiMapper.selectTcNetworkPingtaiById(id);
    }

    /**
     * 查询网络平台列表
     * 
     * @param tcNetworkPingtai 网络平台
     * @return 网络平台
     */
    @Override
    public List<TcNetworkPingtai> selectTcNetworkPingtaiList(TcNetworkPingtai tcNetworkPingtai)
    {
        return tcNetworkPingtaiMapper.selectTcNetworkPingtaiList(tcNetworkPingtai);
    }

    /**
     * 新增网络平台
     * 
     * @param tcNetworkPingtai 网络平台
     * @return 结果
     */
    @Override
    public int insertTcNetworkPingtai(TcNetworkPingtai tcNetworkPingtai)
    {
        tcNetworkPingtai.setCreateTime(DateUtils.getNowDate());
        return tcNetworkPingtaiMapper.insertTcNetworkPingtai(tcNetworkPingtai);
    }

    /**
     * 修改网络平台
     * 
     * @param tcNetworkPingtai 网络平台
     * @return 结果
     */
    @Override
    public int updateTcNetworkPingtai(TcNetworkPingtai tcNetworkPingtai)
    {
        tcNetworkPingtai.setUpdateTime(DateUtils.getNowDate());
        return tcNetworkPingtaiMapper.updateTcNetworkPingtai(tcNetworkPingtai);
    }

    /**
     * 批量删除网络平台
     * 
     * @param ids 需要删除的网络平台主键
     * @return 结果
     */
    @Override
    public int deleteTcNetworkPingtaiByIds(Long[] ids)
    {
        return tcNetworkPingtaiMapper.deleteTcNetworkPingtaiByIds(ids);
    }

    /**
     * 删除网络平台信息
     * 
     * @param id 网络平台主键
     * @return 结果
     */
    @Override
    public int deleteTcNetworkPingtaiById(Long id)
    {
        return tcNetworkPingtaiMapper.deleteTcNetworkPingtaiById(id);
    }
}
