LearnStudentServiceImpl.java 2.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106
  1. package com.ruoyi.learn.service.impl;
  2. import java.util.List;
  3. import org.springframework.beans.factory.annotation.Autowired;
  4. import org.springframework.stereotype.Service;
  5. import com.ruoyi.learn.mapper.LearnStudentMapper;
  6. import com.ruoyi.learn.domain.LearnStudent;
  7. import com.ruoyi.learn.dto.StudyRecordStatisticsDTO;
  8. import com.ruoyi.learn.service.ILearnStudentService;
  9. /**
  10. * 学生Service业务层处理
  11. *
  12. * @author ruoyi
  13. * @date 2025-09-18
  14. */
  15. @Service
  16. public class LearnStudentServiceImpl implements ILearnStudentService
  17. {
  18. @Autowired
  19. private LearnStudentMapper learnStudentMapper;
  20. /**
  21. * 查询学生
  22. *
  23. * @param studentId 学生主键
  24. * @return 学生
  25. */
  26. @Override
  27. public LearnStudent selectLearnStudentByStudentId(Long studentId)
  28. {
  29. return learnStudentMapper.selectLearnStudentByStudentId(studentId);
  30. }
  31. /**
  32. * 查询学生列表
  33. *
  34. * @param learnStudent 学生
  35. * @return 学生
  36. */
  37. @Override
  38. public List<LearnStudent> selectLearnStudentList(LearnStudent learnStudent)
  39. {
  40. return learnStudentMapper.selectLearnStudentList(learnStudent);
  41. }
  42. /**
  43. * 新增学生
  44. *
  45. * @param learnStudent 学生
  46. * @return 结果
  47. */
  48. @Override
  49. public int insertLearnStudent(LearnStudent learnStudent)
  50. {
  51. return learnStudentMapper.insertLearnStudent(learnStudent);
  52. }
  53. /**
  54. * 修改学生
  55. *
  56. * @param learnStudent 学生
  57. * @return 结果
  58. */
  59. @Override
  60. public int updateLearnStudent(LearnStudent learnStudent)
  61. {
  62. return learnStudentMapper.updateLearnStudent(learnStudent);
  63. }
  64. /**
  65. * 批量删除学生
  66. *
  67. * @param studentIds 需要删除的学生主键
  68. * @return 结果
  69. */
  70. @Override
  71. public int deleteLearnStudentByStudentIds(Long[] studentIds)
  72. {
  73. return learnStudentMapper.deleteLearnStudentByStudentIds(studentIds);
  74. }
  75. /**
  76. * 删除学生信息
  77. *
  78. * @param studentId 学生主键
  79. * @return 结果
  80. */
  81. @Override
  82. public int deleteLearnStudentByStudentId(Long studentId)
  83. {
  84. return learnStudentMapper.deleteLearnStudentByStudentId(studentId);
  85. }
  86. /**
  87. * 统计学习记录
  88. *
  89. * @param dto 查询参数
  90. * @return 学习记录统计结果集合
  91. */
  92. @Override
  93. public List<StudyRecordStatisticsDTO> statisticStudyRecord(StudyRecordStatisticsDTO dto)
  94. {
  95. return learnStudentMapper.statisticStudyRecord(dto);
  96. }
  97. }