package com.ruoyi.system.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.system.mapper.RegisterTeacherClassMapper;
import com.ruoyi.system.domain.RegisterTeacherClass;
import com.ruoyi.system.service.IRegisterTeacherClassService;

/**
 * 注册-老师-班级（学科）Service业务层处理
 * 
 * @author ruoyi
 * @date 2023-05-25
 */
@Service
public class RegisterTeacherClassServiceImpl implements IRegisterTeacherClassService 
{
    @Autowired
    private RegisterTeacherClassMapper registerTeacherClassMapper;

    /**
     * 查询注册-老师-班级（学科）
     * 
     * @param id 注册-老师-班级（学科）主键
     * @return 注册-老师-班级（学科）
     */
    @Override
    public RegisterTeacherClass selectRegisterTeacherClassById(Long id)
    {
        return registerTeacherClassMapper.selectRegisterTeacherClassById(id);
    }

    /**
     * 查询注册-老师-班级（学科）列表
     * 
     * @param registerTeacherClass 注册-老师-班级（学科）
     * @return 注册-老师-班级（学科）
     */
    @Override
    public List<RegisterTeacherClass> selectRegisterTeacherClassList(RegisterTeacherClass registerTeacherClass)
    {
        return registerTeacherClassMapper.selectRegisterTeacherClassList(registerTeacherClass);
    }

    /**
     * 新增注册-老师-班级（学科）
     * 
     * @param registerTeacherClass 注册-老师-班级（学科）
     * @return 结果
     */
    @Override
    public int insertRegisterTeacherClass(RegisterTeacherClass registerTeacherClass)
    {
        registerTeacherClass.setCreateTime(DateUtils.getNowDate());
        return registerTeacherClassMapper.insertRegisterTeacherClass(registerTeacherClass);
    }

    /**
     * 修改注册-老师-班级（学科）
     * 
     * @param registerTeacherClass 注册-老师-班级（学科）
     * @return 结果
     */
    @Override
    public int updateRegisterTeacherClass(RegisterTeacherClass registerTeacherClass)
    {
        registerTeacherClass.setUpdateTime(DateUtils.getNowDate());
        return registerTeacherClassMapper.updateRegisterTeacherClass(registerTeacherClass);
    }

    /**
     * 批量删除注册-老师-班级（学科）
     * 
     * @param ids 需要删除的注册-老师-班级（学科）主键
     * @return 结果
     */
    @Override
    public int deleteRegisterTeacherClassByIds(Long[] ids)
    {
        return registerTeacherClassMapper.deleteRegisterTeacherClassByIds(ids);
    }

    /**
     * 删除注册-老师-班级（学科）信息
     * 
     * @param id 注册-老师-班级（学科）主键
     * @return 结果
     */
    @Override
    public int deleteRegisterTeacherClassById(Long id)
    {
        return registerTeacherClassMapper.deleteRegisterTeacherClassById(id);
    }
}
