教务管理系统之dao层
AnswerDao
package com.example.academicadministration.dao;
import com.example.academicadministration.pojo.Answer;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface AnswerDao {
int addAnswer(Answer answer);
int updateAnswer(Answer answer);
int updateScore(Answer answer);
int deleteAnswer(@Param("stuid") String stuid,@Param("homeworkid") String homeworkid);
Answer myAnswer(@Param("stuid") String stuid,@Param("homeworkid") String homeworkid);
}
CourseDao
package com.example.academicadministration.dao;
import com.example.academicadministration.pojo.Course;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface CourseDao {
int addCourse(Course course);
int deleteCourse(String courseid);
int addTeacherCourse(@Param("teaid") String teaid,@Param("courseid") String courseid);
int deleteTeacherCourse(@Param("teaid") String teaid,@Param("courseid") String courseid);
int addStudentCourse(@Param("stuid") String stuid,@Param("courseid") String courseid);
int addNum(String courseid);
int deleteStudentCourse(@Param("stuid") String stuid,@Param("courseid") String courseid);
int deleteNum(String courseid);
String browseScore(@Param("stuid") String stuid,@Param("courseid") String courseid);
int updateScore(@Param("coursescore") String coursescore,@Param("stuid") String stuid,@Param("courseid") String courseid);
List<Course> myCourse(String stuid);
List<Course> TmyCourse(String teaid);
List<Course> browseCourse(String condition);
List<String> checkTeacher(@Param("courseid") String courseid,@Param("teaid") String teaid);
}
HomeworkDao
package com.example.academicadministration.dao;
import com.example.academicadministration.pojo.Homework;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface HomeworkDao {
int addHomework(Homework homework);
int deleteHomework(String homeworkid);
List<Homework> browseHomeworkAll(String courseid);
List<Homework> browseHomework1(String courseid);
List<Homework> browseHomework2(String courseid);
}
MangerDao
package com.example.academicadministration.dao;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
@Mapper
public interface MangerDao {
String login(String id);
int reset(@Param("mangerid") String mangerid,@Param("oldpwd") String oldpwd, @Param("newpwd") String newpwd1);
}
StudentDao
package com.example.academicadministration.dao;
import com.example.academicadministration.pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface StudentDao {
int addStudent(Student student);
int deleteStudent(String stuid);
int auditStudent(String stuid);
int inauditStudent(String stuid);
int reset(@Param("stuid") String stuid,@Param("stupwd") String stupwd,@Param("newpwd") String newpwd);
List<Student> myStudent(String courseid);
List<Student> browseStudent(String condition);
}
TeacherDao
package com.example.academicadministration.dao;
import com.example.academicadministration.pojo.*;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;
import java.util.List;
@Mapper
public interface TeacherDao {
int addTeacher(Teacher teacher);
int deleteTeacher(String teaid);
int auditTeacher(String teaid);
int inauditTeacher(String teaid);
int reset(@Param("teaid") String teaid,@Param("teapwd") String teapwd,@Param("newpwd") String newpwd);
List<Teacher> browseTeacher(String condition);
}
VideoDao
package com.example.academicadministration.dao;
import com.example.academicadministration.pojo.Video;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface VideoDao {
int addVideo(Video video);
int deleteVideo(String videoid);
List<Video> browseVideo(String condition);
}