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.TcZhongdianWorkMapper;
import com.ruoyi.zongzhi.domain.TcZhongdianWork;
import com.ruoyi.zongzhi.service.ITcZhongdianWorkService;

/**
 * 重点工作项目Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-08-10
 */
@Service
public class TcZhongdianWorkServiceImpl implements ITcZhongdianWorkService 
{
    @Autowired
    private TcZhongdianWorkMapper tcZhongdianWorkMapper;

    /**
     * 查询重点工作项目
     * 
     * @param id 重点工作项目主键
     * @return 重点工作项目
     */
    @Override
    public TcZhongdianWork selectTcZhongdianWorkById(Long id)
    {
        return tcZhongdianWorkMapper.selectTcZhongdianWorkById(id);
    }

    /**
     * 查询重点工作项目列表
     * 
     * @param tcZhongdianWork 重点工作项目
     * @return 重点工作项目
     */
    @Override
    public List<TcZhongdianWork> selectTcZhongdianWorkList(TcZhongdianWork tcZhongdianWork)
    {
        return tcZhongdianWorkMapper.selectTcZhongdianWorkList(tcZhongdianWork);
    }

    /**
     * 新增重点工作项目
     * 
     * @param tcZhongdianWork 重点工作项目
     * @return 结果
     */
    @Override
    public int insertTcZhongdianWork(TcZhongdianWork tcZhongdianWork)
    {
        tcZhongdianWork.setCreateTime(DateUtils.getNowDate());
        return tcZhongdianWorkMapper.insertTcZhongdianWork(tcZhongdianWork);
    }

    /**
     * 修改重点工作项目
     * 
     * @param tcZhongdianWork 重点工作项目
     * @return 结果
     */
    @Override
    public int updateTcZhongdianWork(TcZhongdianWork tcZhongdianWork)
    {
        tcZhongdianWork.setUpdateTime(DateUtils.getNowDate());
        return tcZhongdianWorkMapper.updateTcZhongdianWork(tcZhongdianWork);
    }

    /**
     * 批量删除重点工作项目
     * 
     * @param ids 需要删除的重点工作项目主键
     * @return 结果
     */
    @Override
    public int deleteTcZhongdianWorkByIds(Long[] ids)
    {
        return tcZhongdianWorkMapper.deleteTcZhongdianWorkByIds(ids);
    }

    /**
     * 删除重点工作项目信息
     * 
     * @param id 重点工作项目主键
     * @return 结果
     */
    @Override
    public int deleteTcZhongdianWorkById(Long id)
    {
        return tcZhongdianWorkMapper.deleteTcZhongdianWorkById(id);
    }
}
