package com.ruoyi.sim.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.sim.mapper.RealExamMapper; import com.ruoyi.sim.domain.RealExam; /** * 考试Service业务层处理 * * @author tom * @date 2024-12-15 */ @Service public class RealExamService { @Autowired private RealExamMapper realExamMapper; /** * 查询考试 * * @param examId 考试主键 * @return 考试 */ public RealExam selectRealExamByExamId(Long examId) { return realExamMapper.selectRealExamByExamId(examId); } /** * 查询考试列表 * * @param realExam 考试 * @return 考试 */ public List selectRealExamList(RealExam realExam) { return realExamMapper.selectRealExamList(realExam); } /** * 新增考试 * * @param realExam 考试 * @return 结果 */ public int insertRealExam(RealExam realExam) { realExam.setCreateTime(DateUtils.getNowDate()); return realExamMapper.insertRealExam(realExam); } /** * 修改考试 * * @param realExam 考试 * @return 结果 */ public int updateRealExam(RealExam realExam) { realExam.setUpdateTime(DateUtils.getNowDate()); return realExamMapper.updateRealExam(realExam); } /** * 批量删除考试 * * @param examIds 需要删除的考试主键 * @return 结果 */ public int deleteRealExamByExamIds(Long[] examIds) { return realExamMapper.deleteRealExamByExamIds(examIds); } /** * 删除考试信息 * * @param examId 考试主键 * @return 结果 */ public int deleteRealExamByExamId(Long examId) { return realExamMapper.deleteRealExamByExamId(examId); } }