package com.srs.teacher.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
import com.srs.teacher.mapper.SysTeacherCourseMapper;
import com.srs.teacher.domain.SysTeacherCourse;
import com.srs.teacher.service.ISysTeacherCourseService;

/**
 * courseService业务层处理
 *
 * @author srs
 * @date 2024-06-05
 */
@Service
public class SysTeacherCourseServiceImpl extends ServiceImpl<SysTeacherCourseMapper,SysTeacherCourse> implements ISysTeacherCourseService {
    @Autowired
    private SysTeacherCourseMapper sysTeacherCourseMapper;

    /**
     * 查询course
     *
     * @param courseId course主键
     * @return course
     */
    @Override
    public SysTeacherCourse selectSysTeacherCourseByCourseId(Long courseId) {
        return sysTeacherCourseMapper.selectSysTeacherCourseByCourseId(courseId);
    }

    /**
     * 查询course列表
     *
     * @param sysTeacherCourse course
     * @return course
     */
    @Override
    public List<SysTeacherCourse> selectSysTeacherCourseList(SysTeacherCourse sysTeacherCourse) {
        return sysTeacherCourseMapper.selectSysTeacherCourseList(sysTeacherCourse);
    }

    /**
     * 新增course
     *
     * @param sysTeacherCourse course
     * @return 结果
     */
    @Override
    public int insertSysTeacherCourse(SysTeacherCourse sysTeacherCourse) {
            return sysTeacherCourseMapper.insertSysTeacherCourse(sysTeacherCourse);
    }

    /**
     * 修改course
     *
     * @param sysTeacherCourse course
     * @return 结果
     */
    @Override
    public int updateSysTeacherCourse(SysTeacherCourse sysTeacherCourse) {
        return sysTeacherCourseMapper.updateSysTeacherCourse(sysTeacherCourse);
    }

    /**
     * 批量删除course
     *
     * @param courseIds 需要删除的course主键
     * @return 结果
     */
    @Override
    public int deleteSysTeacherCourseByCourseIds(Long[] courseIds) {
        return sysTeacherCourseMapper.deleteSysTeacherCourseByCourseIds(courseIds);
    }

    /**
     * 删除course信息
     *
     * @param courseId course主键
     * @return 结果
     */
    @Override
    public int deleteSysTeacherCourseByCourseId(Long courseId) {
        return sysTeacherCourseMapper.deleteSysTeacherCourseByCourseId(courseId);
    }
}
