package com.ruoyi.system.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.system.mapper.ExamineScheduleMapper;
import com.ruoyi.system.domain.ExamineSchedule;
import com.ruoyi.system.service.IExamineScheduleService;

/**
 * 审核进度Service业务层处理
 * 
 * @author boman
 * @date 2022-01-24
 */
@Service
public class ExamineScheduleServiceImpl implements IExamineScheduleService 
{
    @Autowired
    private ExamineScheduleMapper examineScheduleMapper;

    /**
     * 查询审核进度
     * 
     * @param id 审核进度主键
     * @return 审核进度
     */
    @Override
    public ExamineSchedule selectExamineScheduleById(Long id)
    {
        return examineScheduleMapper.selectExamineScheduleById(id);
    }

    /**
     * 根据文章id去查询进度
     * @param id
     * @return
     */
    @Override
    public ExamineSchedule selectExamineScheduleByNewId(Long id) {
        return    examineScheduleMapper.selectExamineScheduleByNewId(id);
    }

    /**
     * 查询审核进度列表
     * 
     * @param examineSchedule 审核进度
     * @return 审核进度
     */
    @Override
    public List<ExamineSchedule> selectExamineScheduleList(ExamineSchedule examineSchedule)
    {
        return examineScheduleMapper.selectExamineScheduleList(examineSchedule);
    }

    /**
     * 新增审核进度
     * 
     * @param examineSchedule 审核进度
     * @return 结果
     */
    @Override
    public int insertExamineSchedule(ExamineSchedule examineSchedule)
    {
        examineSchedule.setCreateTime(DateUtils.getNowDate());
        return examineScheduleMapper.insertExamineSchedule(examineSchedule);
    }

    /**
     * 修改审核进度
     * 
     * @param examineSchedule 审核进度
     * @return 结果
     */
    @Override
    public int updateExamineSchedule(ExamineSchedule examineSchedule)
    {
        examineSchedule.setUpdateTime(DateUtils.getNowDate());
        return examineScheduleMapper.updateExamineSchedule(examineSchedule);
    }

    /**
     * 批量删除审核进度
     * 
     * @param ids 需要删除的审核进度主键
     * @return 结果
     */
    @Override
    public int deleteExamineScheduleByIds(Long[] ids)
    {
        return examineScheduleMapper.deleteExamineScheduleByIds(ids);
    }

    /**
     * 删除审核进度信息
     * 
     * @param id 审核进度主键
     * @return 结果
     */
    @Override
    public int deleteExamineScheduleById(Long id)
    {
        return examineScheduleMapper.deleteExamineScheduleById(id);
    }
}
