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.SysTeacherContestMapper;
import com.srs.teacher.domain.SysTeacherContest;
import com.srs.teacher.service.ISysTeacherContestService;

/**
 * contestService业务层处理
 *
 * @author srs
 * @date 2024-06-29
 */
@Service
public class SysTeacherContestServiceImpl extends ServiceImpl<SysTeacherContestMapper,SysTeacherContest> implements ISysTeacherContestService {
    @Autowired
    private SysTeacherContestMapper sysTeacherContestMapper;

    /**
     * 查询contest
     *
     * @param contestId contest主键
     * @return contest
     */
    @Override
    public SysTeacherContest selectSysTeacherContestByContestId(Long contestId) {
        return sysTeacherContestMapper.selectSysTeacherContestByContestId(contestId);
    }

    /**
     * 查询contest列表
     *
     * @param sysTeacherContest contest
     * @return contest
     */
    @Override
    public List<SysTeacherContest> selectSysTeacherContestList(SysTeacherContest sysTeacherContest) {
        return sysTeacherContestMapper.selectSysTeacherContestList(sysTeacherContest);
    }

    /**
     * 新增contest
     *
     * @param sysTeacherContest contest
     * @return 结果
     */
    @Override
    public int insertSysTeacherContest(SysTeacherContest sysTeacherContest) {
            return sysTeacherContestMapper.insertSysTeacherContest(sysTeacherContest);
    }

    /**
     * 修改contest
     *
     * @param sysTeacherContest contest
     * @return 结果
     */
    @Override
    public int updateSysTeacherContest(SysTeacherContest sysTeacherContest) {
        return sysTeacherContestMapper.updateSysTeacherContest(sysTeacherContest);
    }

    /**
     * 批量删除contest
     *
     * @param contestIds 需要删除的contest主键
     * @return 结果
     */
    @Override
    public int deleteSysTeacherContestByContestIds(Long[] contestIds) {
        return sysTeacherContestMapper.deleteSysTeacherContestByContestIds(contestIds);
    }

    /**
     * 删除contest信息
     *
     * @param contestId contest主键
     * @return 结果
     */
    @Override
    public int deleteSysTeacherContestByContestId(Long contestId) {
        return sysTeacherContestMapper.deleteSysTeacherContestByContestId(contestId);
    }
}
