package com.ruoyi.abuwx.service.impl.exam;

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.abuwx.mapper.exam.ExmExamMapper;
import com.ruoyi.abuwx.domain.exam.ExmExam;
import com.ruoyi.abuwx.service.exam.IExmExamService;

/**
 * 考试Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-05-17
 */
@Service
public class ExmExamServiceImpl implements IExmExamService 
{
    @Autowired
    private ExmExamMapper exmExamMapper;

    /**
     * 查询考试
     * 
     * @param id 考试主键
     * @return 考试
     */
    @Override
    public ExmExam selectExmExamById(Long id)
    {
        return exmExamMapper.selectExmExamById(id);
    }

    /**
     * 查询考试列表
     * 
     * @param exmExam 考试
     * @return 考试
     */
    @Override
    public List<ExmExam> selectExmExamList(ExmExam exmExam)
    {
        return exmExamMapper.selectExmExamList(exmExam);
    }

    /**
     * 新增考试
     * 
     * @param exmExam 考试
     * @return 结果
     */
    @Override
    public int insertExmExam(ExmExam exmExam)
    {
        return exmExamMapper.insertExmExam(exmExam);
    }

    /**
     * 修改考试
     * 
     * @param exmExam 考试
     * @return 结果
     */
    @Override
    public int updateExmExam(ExmExam exmExam)
    {
        exmExam.setUpdateTime(DateUtils.getNowDate());
        return exmExamMapper.updateExmExam(exmExam);
    }

    /**
     * 批量删除考试
     * 
     * @param ids 需要删除的考试主键
     * @return 结果
     */
    @Override
    public int deleteExmExamByIds(Long[] ids)
    {
        return exmExamMapper.deleteExmExamByIds(ids);
    }

    /**
     * 删除考试信息
     * 
     * @param id 考试主键
     * @return 结果
     */
    @Override
    public int deleteExmExamById(Long id)
    {
        return exmExamMapper.deleteExmExamById(id);
    }
}
