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.SysTeacherExerciseMapper;
import com.srs.teacher.domain.SysTeacherExercise;
import com.srs.teacher.service.ISysTeacherExerciseService;

/**
 * exerciseService业务层处理
 *
 * @author srs
 * @date 2024-06-05
 */
@Service
public class SysTeacherExerciseServiceImpl extends ServiceImpl<SysTeacherExerciseMapper,SysTeacherExercise> implements ISysTeacherExerciseService {
    @Autowired
    private SysTeacherExerciseMapper sysTeacherExerciseMapper;

    /**
     * 查询exercise
     *
     * @param exerciseId exercise主键
     * @return exercise
     */
    @Override
    public SysTeacherExercise selectSysTeacherExerciseByExerciseId(Long exerciseId) {
        return sysTeacherExerciseMapper.selectSysTeacherExerciseByExerciseId(exerciseId);
    }

    /**
     * 查询exercise列表
     *
     * @param sysTeacherExercise exercise
     * @return exercise
     */
    @Override
    public List<SysTeacherExercise> selectSysTeacherExerciseList(SysTeacherExercise sysTeacherExercise) {
        return sysTeacherExerciseMapper.selectSysTeacherExerciseList(sysTeacherExercise);
    }

    /**
     * 新增exercise
     *
     * @param sysTeacherExercise exercise
     * @return 结果
     */
    @Override
    public int insertSysTeacherExercise(SysTeacherExercise sysTeacherExercise) {
            return sysTeacherExerciseMapper.insertSysTeacherExercise(sysTeacherExercise);
    }

    /**
     * 修改exercise
     *
     * @param sysTeacherExercise exercise
     * @return 结果
     */
    @Override
    public int updateSysTeacherExercise(SysTeacherExercise sysTeacherExercise) {
        return sysTeacherExerciseMapper.updateSysTeacherExercise(sysTeacherExercise);
    }

    /**
     * 批量删除exercise
     *
     * @param exerciseIds 需要删除的exercise主键
     * @return 结果
     */
    @Override
    public int deleteSysTeacherExerciseByExerciseIds(Long[] exerciseIds) {
        return sysTeacherExerciseMapper.deleteSysTeacherExerciseByExerciseIds(exerciseIds);
    }

    /**
     * 删除exercise信息
     *
     * @param exerciseId exercise主键
     * @return 结果
     */
    @Override
    public int deleteSysTeacherExerciseByExerciseId(Long exerciseId) {
        return sysTeacherExerciseMapper.deleteSysTeacherExerciseByExerciseId(exerciseId);
    }
}
