|
|
|
@ -16,7 +16,7 @@ public interface StudentService {
|
|
|
|
|
* @return 返回学生列表
|
|
|
|
|
* @throws Exception 如果查询过程中发生错误
|
|
|
|
|
*/
|
|
|
|
|
List<Student> findAll(int page, int size) throws Exception;
|
|
|
|
|
List<Student> findAll(int page, int size) throws Exception; // 定义分页查询所有学生信息的方法
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据学号查询学生信息
|
|
|
|
@ -24,7 +24,7 @@ public interface StudentService {
|
|
|
|
|
* @return 返回对应的学生对象
|
|
|
|
|
* @throws Exception 如果查询过程中发生错误
|
|
|
|
|
*/
|
|
|
|
|
Student findBySno(String sno) throws Exception;
|
|
|
|
|
Student findBySno(String sno) throws Exception; // 定义根据学号查询学生信息的方法
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 分页搜索学生信息
|
|
|
|
@ -34,7 +34,7 @@ public interface StudentService {
|
|
|
|
|
* @return 返回符合条件的学生列表
|
|
|
|
|
* @throws Exception 如果搜索过程中发生错误
|
|
|
|
|
*/
|
|
|
|
|
List<Student> search(int page, int size, String keyword) throws Exception;
|
|
|
|
|
List<Student> search(int page, int size, String keyword) throws Exception; // 定义分页搜索学生信息的方法
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 添加新的学生信息
|
|
|
|
@ -42,28 +42,28 @@ public interface StudentService {
|
|
|
|
|
* @return 成功添加返回true,否则返回false
|
|
|
|
|
* @throws Exception 如果添加过程中发生错误
|
|
|
|
|
*/
|
|
|
|
|
boolean add(Student student) throws Exception;
|
|
|
|
|
boolean add(Student student) throws Exception; // 定义添加新学生信息的方法
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据学号删除学生信息
|
|
|
|
|
* @param sno 学生的学号
|
|
|
|
|
* @throws Exception 如果删除过程中发生错误
|
|
|
|
|
*/
|
|
|
|
|
void delete(String sno) throws Exception;
|
|
|
|
|
void delete(String sno) throws Exception; // 定义根据学号删除学生信息的方法
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 更新学生信息
|
|
|
|
|
* @param student 要更新的学生对象
|
|
|
|
|
* @throws Exception 如果更新过程中发生错误
|
|
|
|
|
*/
|
|
|
|
|
void update(Student student) throws Exception;
|
|
|
|
|
void update(Student student) throws Exception; // 定义更新学生信息的方法
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 获取包含所有学生信息的输入流
|
|
|
|
|
* @return 返回一个携带所有学生信息数据的InputStream输入流
|
|
|
|
|
* @throws Exception 如果获取过程中发生错误
|
|
|
|
|
*/
|
|
|
|
|
InputStream getInputStream() throws Exception;
|
|
|
|
|
InputStream getInputStream() throws Exception; // 定义获取所有学生信息输入流的方法
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据宿舍ID和状态查询学生信息
|
|
|
|
@ -72,7 +72,7 @@ public interface StudentService {
|
|
|
|
|
* @return 返回符合条件的学生列表
|
|
|
|
|
* @throws Exception 如果查询过程中发生错误
|
|
|
|
|
*/
|
|
|
|
|
List<Student> findByDormId(String dorm_id, Integer status) throws Exception;
|
|
|
|
|
List<Student> findByDormId(String dorm_id, Integer status) throws Exception; // 定义根据宿舍ID和状态查询学生信息的方法
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据教师姓名分页查询学生信息
|
|
|
|
@ -82,7 +82,7 @@ public interface StudentService {
|
|
|
|
|
* @return 返回符合条件的学生列表
|
|
|
|
|
* @throws Exception 如果查询过程中发生错误
|
|
|
|
|
*/
|
|
|
|
|
List<Student> findByTeacher(int page, int size, String teacher) throws Exception;
|
|
|
|
|
List<Student> findByTeacher(int page, int size, String teacher) throws Exception; // 定义根据教师姓名分页查询学生信息的方法
|
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* 根据教师姓名和搜索关键字分页查询学生信息
|
|
|
|
@ -93,5 +93,5 @@ public interface StudentService {
|
|
|
|
|
* @return 返回符合条件的学生列表
|
|
|
|
|
* @throws Exception 如果查询过程中发生错误
|
|
|
|
|
*/
|
|
|
|
|
List<Student> searchStudent(int page, int size, String teacher, String keyword) throws Exception;
|
|
|
|
|
List<Student> searchStudent(int page, int size, String teacher, String keyword) throws Exception; // 定义根据教师姓名和搜索关键字分页查询学生信息的方法
|
|
|
|
|
}
|
|
|
|
|