package com.school.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.school.dao.TeacherDao;
import com.school.entity.Teacher;
import com.school.service.TeacherService;

// 注入service
//@Service("teacherService")
public class TeacherServiceImpl implements TeacherService {

	@Autowired
	private TeacherDao teacherDao;

	public void deleteTeacher(int id) {
		teacherDao.deleteTeacher(id);
	}

	public void insertTeacher(Teacher teacher) {
		teacherDao.insertTeacher(teacher);
	}

	public Teacher selectById(int id) {
		return teacherDao.selectById(id);
	}

	public List<Teacher> selectTeacher() {
		return teacherDao.selectTeacher();
	}

	public void updateTeacher(Teacher teacher) {
		teacherDao.updateTeacher(teacher);
	}

}
