RealExamService.java 1.9 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283
  1. package com.ruoyi.sim.service.impl;
  2. import java.util.List;
  3. import com.ruoyi.common.utils.DateUtils;
  4. import org.springframework.beans.factory.annotation.Autowired;
  5. import org.springframework.stereotype.Service;
  6. import com.ruoyi.sim.mapper.RealExamMapper;
  7. import com.ruoyi.sim.domain.RealExam;
  8. /**
  9. * 考试Service业务层处理
  10. *
  11. * @author tom
  12. * @date 2024-12-15
  13. */
  14. @Service
  15. public class RealExamService {
  16. @Autowired
  17. private RealExamMapper realExamMapper;
  18. /**
  19. * 查询考试
  20. *
  21. * @param examId 考试主键
  22. * @return 考试
  23. */
  24. public RealExam selectRealExamByExamId(Long examId) {
  25. return realExamMapper.selectRealExamByExamId(examId);
  26. }
  27. /**
  28. * 查询考试列表
  29. *
  30. * @param realExam 考试
  31. * @return 考试
  32. */
  33. public List<RealExam> selectRealExamList(RealExam realExam) {
  34. return realExamMapper.selectRealExamList(realExam);
  35. }
  36. /**
  37. * 新增考试
  38. *
  39. * @param realExam 考试
  40. * @return 结果
  41. */
  42. public int insertRealExam(RealExam realExam) {
  43. realExam.setCreateTime(DateUtils.getNowDate());
  44. return realExamMapper.insertRealExam(realExam);
  45. }
  46. /**
  47. * 修改考试
  48. *
  49. * @param realExam 考试
  50. * @return 结果
  51. */
  52. public int updateRealExam(RealExam realExam) {
  53. realExam.setUpdateTime(DateUtils.getNowDate());
  54. return realExamMapper.updateRealExam(realExam);
  55. }
  56. /**
  57. * 批量删除考试
  58. *
  59. * @param examIds 需要删除的考试主键
  60. * @return 结果
  61. */
  62. public int deleteRealExamByExamIds(Long[] examIds) {
  63. return realExamMapper.deleteRealExamByExamIds(examIds);
  64. }
  65. /**
  66. * 删除考试信息
  67. *
  68. * @param examId 考试主键
  69. * @return 结果
  70. */
  71. public int deleteRealExamByExamId(Long examId) {
  72. return realExamMapper.deleteRealExamByExamId(examId);
  73. }
  74. }