package com.ruoyi.learn.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.learn.mapper.LearnTestStudentMapper;
import com.ruoyi.learn.domain.LearnTestStudent;
import com.ruoyi.learn.service.ILearnTestStudentService;

/**
 * 测试学生Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-18
 */
@Service
public class LearnTestStudentServiceImpl implements ILearnTestStudentService 
{
    @Autowired
    private LearnTestStudentMapper learnTestStudentMapper;

    /**
     * 查询测试学生
     * 
     * @param id 测试学生主键
     * @return 测试学生
     */
    @Override
    public LearnTestStudent selectLearnTestStudentById(Long id)
    {
        return learnTestStudentMapper.selectLearnTestStudentById(id);
    }

    /**
     * 查询测试学生列表
     * 
     * @param learnTestStudent 测试学生
     * @return 测试学生
     */
    @Override
    public List<LearnTestStudent> selectLearnTestStudentList(LearnTestStudent learnTestStudent)
    {
        return learnTestStudentMapper.selectLearnTestStudentList(learnTestStudent);
    }

    /**
     * 新增测试学生
     * 
     * @param learnTestStudent 测试学生
     * @return 结果
     */
    @Override
    public int insertLearnTestStudent(LearnTestStudent learnTestStudent)
    {
        learnTestStudent.setCreateTime(DateUtils.getNowDate());
        return learnTestStudentMapper.insertLearnTestStudent(learnTestStudent);
    }

    /**
     * 修改测试学生
     * 
     * @param learnTestStudent 测试学生
     * @return 结果
     */
    @Override
    public int updateLearnTestStudent(LearnTestStudent learnTestStudent)
    {
        return learnTestStudentMapper.updateLearnTestStudent(learnTestStudent);
    }

    /**
     * 批量删除测试学生
     * 
     * @param ids 需要删除的测试学生主键
     * @return 结果
     */
    @Override
    public int deleteLearnTestStudentByIds(Long[] ids)
    {
        return learnTestStudentMapper.deleteLearnTestStudentByIds(ids);
    }

    /**
     * 删除测试学生信息
     * 
     * @param id 测试学生主键
     * @return 结果
     */
    @Override
    public int deleteLearnTestStudentById(Long id)
    {
        return learnTestStudentMapper.deleteLearnTestStudentById(id);
    }
}
