package com.ruoyi.test.seriver.Impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.test.domain.TeacherManageClass;
import com.ruoyi.test.mapper.TeacherManageClassMapper;
import com.ruoyi.test.seriver.ITeacherManageClassService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class TeacherManageClassServiceImpl extends ServiceImpl<TeacherManageClassMapper, TeacherManageClass> implements ITeacherManageClassService {

    @Autowired
    private TeacherManageClassMapper teacherManageClassMapper;

    @Override
    public List<TeacherManageClass> totalClass(Long teacherid) {
        LambdaQueryWrapper<TeacherManageClass> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(TeacherManageClass::getTeacherid,teacherid);
        return teacherManageClassMapper.selectList(queryWrapper);
    }

    @Override
    public int deleteClass(String grade,String Class1) {
        return teacherManageClassMapper.deleteClass(grade,Class1);
    }

    @Override
    public int addclass1(Long teacherid,String grade, String Class1) {
        return teacherManageClassMapper.addclass1(teacherid,grade,Class1);
    }
}
