package com.ruoyi.learn.service.impl; import java.util.List; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import com.ruoyi.learn.mapper.LearnStudentMapper; import com.ruoyi.learn.domain.LearnStudent; import com.ruoyi.learn.dto.StudyRecordStatisticsDTO; import com.ruoyi.learn.service.ILearnStudentService; /** * 学生Service业务层处理 * * @author ruoyi * @date 2025-09-18 */ @Service public class LearnStudentServiceImpl implements ILearnStudentService { @Autowired private LearnStudentMapper learnStudentMapper; /** * 查询学生 * * @param studentId 学生主键 * @return 学生 */ @Override public LearnStudent selectLearnStudentByStudentId(Long studentId) { return learnStudentMapper.selectLearnStudentByStudentId(studentId); } /** * 查询学生列表 * * @param learnStudent 学生 * @return 学生 */ @Override public List selectLearnStudentList(LearnStudent learnStudent) { return learnStudentMapper.selectLearnStudentList(learnStudent); } /** * 新增学生 * * @param learnStudent 学生 * @return 结果 */ @Override public int insertLearnStudent(LearnStudent learnStudent) { return learnStudentMapper.insertLearnStudent(learnStudent); } /** * 修改学生 * * @param learnStudent 学生 * @return 结果 */ @Override public int updateLearnStudent(LearnStudent learnStudent) { return learnStudentMapper.updateLearnStudent(learnStudent); } /** * 批量删除学生 * * @param studentIds 需要删除的学生主键 * @return 结果 */ @Override public int deleteLearnStudentByStudentIds(Long[] studentIds) { return learnStudentMapper.deleteLearnStudentByStudentIds(studentIds); } /** * 删除学生信息 * * @param studentId 学生主键 * @return 结果 */ @Override public int deleteLearnStudentByStudentId(Long studentId) { return learnStudentMapper.deleteLearnStudentByStudentId(studentId); } /** * 统计学习记录 * * @param dto 查询参数 * @return 学习记录统计结果集合 */ @Override public List statisticStudyRecord(StudyRecordStatisticsDTO dto) { return learnStudentMapper.statisticStudyRecord(dto); } }