-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathteacherDao.java
More file actions
29 lines (21 loc) · 1.01 KB
/
Copy pathteacherDao.java
File metadata and controls
29 lines (21 loc) · 1.01 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package DAO;
import POJO.Course;
import POJO.teacher;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;
import org.springframework.stereotype.Component;
import org.springframework.stereotype.Controller;
@Mapper
@Component
public interface teacherDao {
@Select("select * from teacher where Number = #{id}")
public teacher getById(String id);
@Update("update teacher set ${targetProperty} = #{targetValue} where Number= #{teacherId}")
public void updateMSG(@Param("teacherId") String teacherId, @Param("targetProperty") String targetProperty, @Param("targetValue") String targetValue);
@Update("create table if not exists Course_${courseId} (stuId char(20), stuName char(20));")
public void CreateTable(String CourseId);
@Select("select * from course_opened where teacherID = #{teacherId}")
public Course[] ShowCourse(String teacherId);
}