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.TcZhongdianEnterpriseMapper;
import com.ruoyi.zongzhi.domain.TcZhongdianEnterprise;
import com.ruoyi.zongzhi.service.ITcZhongdianEnterpriseService;

/**
 * 重点企业名录Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-10
 */
@Service
public class TcZhongdianEnterpriseServiceImpl implements ITcZhongdianEnterpriseService 
{
    @Autowired
    private TcZhongdianEnterpriseMapper tcZhongdianEnterpriseMapper;

    /**
     * 查询重点企业名录
     * 
     * @param id 重点企业名录主键
     * @return 重点企业名录
     */
    @Override
    public TcZhongdianEnterprise selectTcZhongdianEnterpriseById(Long id)
    {
        return tcZhongdianEnterpriseMapper.selectTcZhongdianEnterpriseById(id);
    }

    /**
     * 查询重点企业名录列表
     * 
     * @param tcZhongdianEnterprise 重点企业名录
     * @return 重点企业名录
     */
    @Override
    public List<TcZhongdianEnterprise> selectTcZhongdianEnterpriseList(TcZhongdianEnterprise tcZhongdianEnterprise)
    {
        return tcZhongdianEnterpriseMapper.selectTcZhongdianEnterpriseList(tcZhongdianEnterprise);
    }

    /**
     * 新增重点企业名录
     * 
     * @param tcZhongdianEnterprise 重点企业名录
     * @return 结果
     */
    @Override
    public int insertTcZhongdianEnterprise(TcZhongdianEnterprise tcZhongdianEnterprise)
    {
        tcZhongdianEnterprise.setCreateTime(DateUtils.getNowDate());
        return tcZhongdianEnterpriseMapper.insertTcZhongdianEnterprise(tcZhongdianEnterprise);
    }

    /**
     * 修改重点企业名录
     * 
     * @param tcZhongdianEnterprise 重点企业名录
     * @return 结果
     */
    @Override
    public int updateTcZhongdianEnterprise(TcZhongdianEnterprise tcZhongdianEnterprise)
    {
        tcZhongdianEnterprise.setUpdateTime(DateUtils.getNowDate());
        return tcZhongdianEnterpriseMapper.updateTcZhongdianEnterprise(tcZhongdianEnterprise);
    }

    /**
     * 批量删除重点企业名录
     * 
     * @param ids 需要删除的重点企业名录主键
     * @return 结果
     */
    @Override
    public int deleteTcZhongdianEnterpriseByIds(Long[] ids)
    {
        return tcZhongdianEnterpriseMapper.deleteTcZhongdianEnterpriseByIds(ids);
    }

    /**
     * 删除重点企业名录信息
     * 
     * @param id 重点企业名录主键
     * @return 结果
     */
    @Override
    public int deleteTcZhongdianEnterpriseById(Long id)
    {
        return tcZhongdianEnterpriseMapper.deleteTcZhongdianEnterpriseById(id);
    }
}
