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.SysTeacherTrainingMapper;
import com.srs.teacher.domain.SysTeacherTraining;
import com.srs.teacher.service.ISysTeacherTrainingService;

/**
 * trainingService业务层处理
 *
 * @author srs
 * @date 2024-05-29
 */
@Service
public class SysTeacherTrainingServiceImpl extends ServiceImpl<SysTeacherTrainingMapper,SysTeacherTraining> implements ISysTeacherTrainingService {
    @Autowired
    private SysTeacherTrainingMapper sysTeacherTrainingMapper;

    /**
     * 查询training
     *
     * @param trainingId training主键
     * @return training
     */
    @Override
    public SysTeacherTraining selectSysTeacherTrainingByTrainingId(Long trainingId) {
        return sysTeacherTrainingMapper.selectSysTeacherTrainingByTrainingId(trainingId);
    }

    /**
     * 查询training列表
     *
     * @param sysTeacherTraining training
     * @return training
     */
    @Override
    public List<SysTeacherTraining> selectSysTeacherTrainingList(SysTeacherTraining sysTeacherTraining) {
        return sysTeacherTrainingMapper.selectSysTeacherTrainingList(sysTeacherTraining);
    }

    /**
     * 新增training
     *
     * @param sysTeacherTraining training
     * @return 结果
     */
    @Override
    public int insertSysTeacherTraining(SysTeacherTraining sysTeacherTraining) {
            return sysTeacherTrainingMapper.insertSysTeacherTraining(sysTeacherTraining);
    }

    /**
     * 修改training
     *
     * @param sysTeacherTraining training
     * @return 结果
     */
    @Override
    public int updateSysTeacherTraining(SysTeacherTraining sysTeacherTraining) {
        return sysTeacherTrainingMapper.updateSysTeacherTraining(sysTeacherTraining);
    }

    /**
     * 批量删除training
     *
     * @param trainingIds 需要删除的training主键
     * @return 结果
     */
    @Override
    public int deleteSysTeacherTrainingByTrainingIds(Long[] trainingIds) {
        return sysTeacherTrainingMapper.deleteSysTeacherTrainingByTrainingIds(trainingIds);
    }

    /**
     * 删除training信息
     *
     * @param trainingId training主键
     * @return 结果
     */
    @Override
    public int deleteSysTeacherTrainingByTrainingId(Long trainingId) {
        return sysTeacherTrainingMapper.deleteSysTeacherTrainingByTrainingId(trainingId);
    }
}
