branch_shen
shen 3 months ago
parent 64d272d9a9
commit 0e97a6ac63

@ -13,10 +13,7 @@ import java.util.ArrayList;
import java.util.List; import java.util.List;
/** /**
* Description: * StudentServiceImplStudentService
*
* @Date: 2020/2/17 14:22
* @Author: PeiChen
*/ */
@Service("studentService") @Service("studentService")
public class StudentServiceImpl implements StudentService { public class StudentServiceImpl implements StudentService {
@ -29,9 +26,11 @@ public class StudentServiceImpl implements StudentService {
} }
/** /**
* *
* @return * @param page
* @throws Exception * @param size
* @return
* @throws Exception
*/ */
@Override @Override
public List<Student> findAll(int page, int size) throws Exception { public List<Student> findAll(int page, int size) throws Exception {
@ -40,9 +39,10 @@ public class StudentServiceImpl implements StudentService {
} }
/** /**
* sno *
* @return * @param sno
* @throws Exception * @return
* @throws Exception
*/ */
@Override @Override
public Student findBySno(String sno) throws Exception { public Student findBySno(String sno) throws Exception {
@ -50,9 +50,12 @@ public class StudentServiceImpl implements StudentService {
} }
/** /**
* *
* @return * @param page
* @throws Exception * @param size
* @param keyword
* @return
* @throws Exception
*/ */
@Override @Override
public List<Student> search(int page, int size, String keyword) throws Exception { public List<Student> search(int page, int size, String keyword) throws Exception {
@ -61,9 +64,10 @@ public class StudentServiceImpl implements StudentService {
} }
/** /**
* *
* @param student * @param student
* @throws Exception * @return
* @throws Exception
*/ */
@Override @Override
public boolean add(Student student) throws Exception { public boolean add(Student student) throws Exception {
@ -77,9 +81,9 @@ public class StudentServiceImpl implements StudentService {
} }
/** /**
* *
* @param sno * @param sno
* @throws Exception * @throws Exception
*/ */
@Override @Override
public void delete(String sno) throws Exception { public void delete(String sno) throws Exception {
@ -87,9 +91,9 @@ public class StudentServiceImpl implements StudentService {
} }
/** /**
* *
* @param student * @param student
* @throws Exception * @throws Exception
*/ */
@Override @Override
public void update(Student student) throws Exception { public void update(Student student) throws Exception {
@ -97,9 +101,9 @@ public class StudentServiceImpl implements StudentService {
} }
/** /**
* * Excel
* @return * @return Excel
* @throws Exception * @throws Exception
*/ */
@Override @Override
public InputStream getInputStream() throws Exception { public InputStream getInputStream() throws Exception {
@ -121,16 +125,15 @@ public class StudentServiceImpl implements StudentService {
datalist.add(obj); datalist.add(obj);
} }
WriteExcel excel = new WriteExcel(title, datalist); WriteExcel excel = new WriteExcel(title, datalist);
return excel.export(); return excel.export();
} }
/** /**
* 宿status * 宿status
* @param dorm_id * @param dorm_id 宿
* @param status * @param status
* @return * @return
* @throws Exception * @throws Exception
*/ */
@Override @Override
public List<Student> findByDormId(String dorm_id, Integer status) throws Exception { public List<Student> findByDormId(String dorm_id, Integer status) throws Exception {
@ -138,10 +141,12 @@ public class StudentServiceImpl implements StudentService {
} }
/** /**
* teacher * teacher
* @param teacher * @param page
* @return * @param size
* @throws Exception * @param teacher
* @return
* @throws Exception
*/ */
@Override @Override
public List<Student> findByTeacher(int page, int size, String teacher) throws Exception { public List<Student> findByTeacher(int page, int size, String teacher) throws Exception {
@ -149,6 +154,15 @@ public class StudentServiceImpl implements StudentService {
return studentDao.findByTeacher(teacher); return studentDao.findByTeacher(teacher);
} }
/**
*
* @param page
* @param size
* @param teacher
* @param keyword
* @return
* @throws Exception
*/
@Override @Override
public List<Student> searchStudent(int page, int size, String teacher, String keyword) throws Exception { public List<Student> searchStudent(int page, int size, String teacher, String keyword) throws Exception {
PageHelper.startPage(page, size); PageHelper.startPage(page, size);

Loading…
Cancel
Save