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.LearnPaperRealMapper;
import com.ruoyi.learn.domain.LearnPaperReal;
import com.ruoyi.learn.service.ILearnPaperRealService;

/**
 * 真题卷Service业务层处理
 * 
 * @author ruoyi
 * @date 2025-09-18
 */
@Service
public class LearnPaperRealServiceImpl implements ILearnPaperRealService 
{
    @Autowired
    private LearnPaperRealMapper learnPaperRealMapper;

    /**
     * 查询真题卷
     * 
     * @param id 真题卷主键
     * @return 真题卷
     */
    @Override
    public LearnPaperReal selectLearnPaperRealById(Long id)
    {
        return learnPaperRealMapper.selectLearnPaperRealById(id);
    }

    /**
     * 查询真题卷列表
     * 
     * @param learnPaperReal 真题卷
     * @return 真题卷
     */
    @Override
    public List<LearnPaperReal> selectLearnPaperRealList(LearnPaperReal learnPaperReal)
    {
        return learnPaperRealMapper.selectLearnPaperRealList(learnPaperReal);
    }

    /**
     * 新增真题卷
     * 
     * @param learnPaperReal 真题卷
     * @return 结果
     */
    @Override
    public int insertLearnPaperReal(LearnPaperReal learnPaperReal)
    {
        learnPaperReal.setCreateTime(DateUtils.getNowDate());
        return learnPaperRealMapper.insertLearnPaperReal(learnPaperReal);
    }

    /**
     * 修改真题卷
     * 
     * @param learnPaperReal 真题卷
     * @return 结果
     */
    @Override
    public int updateLearnPaperReal(LearnPaperReal learnPaperReal)
    {
        return learnPaperRealMapper.updateLearnPaperReal(learnPaperReal);
    }

    /**
     * 批量删除真题卷
     * 
     * @param ids 需要删除的真题卷主键
     * @return 结果
     */
    @Override
    public int deleteLearnPaperRealByIds(Long[] ids)
    {
        return learnPaperRealMapper.deleteLearnPaperRealByIds(ids);
    }

    /**
     * 删除真题卷信息
     * 
     * @param id 真题卷主键
     * @return 结果
     */
    @Override
    public int deleteLearnPaperRealById(Long id)
    {
        return learnPaperRealMapper.deleteLearnPaperRealById(id);
    }
}
