|
@@ -32,8 +32,8 @@ import cn.com.qmth.examcloud.core.basic.base.constants.BasicConsts;
|
|
import cn.com.qmth.examcloud.core.basic.dao.StudentRepo;
|
|
import cn.com.qmth.examcloud.core.basic.dao.StudentRepo;
|
|
import cn.com.qmth.examcloud.core.basic.dao.UserRepo;
|
|
import cn.com.qmth.examcloud.core.basic.dao.UserRepo;
|
|
import cn.com.qmth.examcloud.core.basic.dao.entity.StudentEntity;
|
|
import cn.com.qmth.examcloud.core.basic.dao.entity.StudentEntity;
|
|
|
|
+import cn.com.qmth.examcloud.core.basic.service.StudentService;
|
|
import cn.com.qmth.examcloud.core.basic.service.bean.StudentInfo;
|
|
import cn.com.qmth.examcloud.core.basic.service.bean.StudentInfo;
|
|
-import cn.com.qmth.examcloud.core.basic.service.impl.StudentServiceImpl;
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
|
/**
|
|
/**
|
|
@@ -48,7 +48,7 @@ public class StudentController extends ControllerSupport {
|
|
StudentRepo studentRepo;
|
|
StudentRepo studentRepo;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
- StudentServiceImpl studentService;
|
|
|
|
|
|
+ StudentService studentService;
|
|
|
|
|
|
@Autowired
|
|
@Autowired
|
|
UserRepo userRepo;
|
|
UserRepo userRepo;
|
|
@@ -65,8 +65,8 @@ public class StudentController extends ControllerSupport {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "查询所有学生", notes = "分页")
|
|
@ApiOperation(value = "查询所有学生", notes = "分页")
|
|
- @GetMapping("/{curPage}/{pageSize}")
|
|
|
|
- public Page<StudentEntity> getAllStudent(@RequestParam String name,
|
|
|
|
|
|
+ @GetMapping("studentPage/{curPage}/{pageSize}")
|
|
|
|
+ public Page<StudentEntity> getStudentPage(@RequestParam String name,
|
|
@RequestParam String studentCode, @RequestParam String identityNumber,
|
|
@RequestParam String studentCode, @RequestParam String identityNumber,
|
|
@PathVariable Integer curPage, @PathVariable Integer pageSize) {
|
|
@PathVariable Integer curPage, @PathVariable Integer pageSize) {
|
|
User accessUser = getAccessUser();
|
|
User accessUser = getAccessUser();
|
|
@@ -103,7 +103,7 @@ public class StudentController extends ControllerSupport {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "按ID查询学生", notes = "ID查询")
|
|
@ApiOperation(value = "按ID查询学生", notes = "ID查询")
|
|
- @GetMapping("/{id}")
|
|
|
|
|
|
+ @GetMapping("{id}")
|
|
public StudentEntity getStudentById(@PathVariable Long id) {
|
|
public StudentEntity getStudentById(@PathVariable Long id) {
|
|
StudentEntity s = studentRepo.findOne(id);
|
|
StudentEntity s = studentRepo.findOne(id);
|
|
return s;
|
|
return s;
|
|
@@ -117,7 +117,7 @@ public class StudentController extends ControllerSupport {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "按ID删除学生", notes = "删除")
|
|
@ApiOperation(value = "按ID删除学生", notes = "删除")
|
|
- @DeleteMapping("/{id}")
|
|
|
|
|
|
+ @DeleteMapping("{id}")
|
|
public Long deleteStudent(@PathVariable Long id) {
|
|
public Long deleteStudent(@PathVariable Long id) {
|
|
studentRepo.delete(id);
|
|
studentRepo.delete(id);
|
|
return id;
|
|
return id;
|
|
@@ -131,7 +131,7 @@ public class StudentController extends ControllerSupport {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "启用学生")
|
|
@ApiOperation(value = "启用学生")
|
|
- @PutMapping("/enable/{ids}")
|
|
|
|
|
|
+ @PutMapping("enable/{ids}")
|
|
public List<String> enableStudent(@PathVariable String ids) {
|
|
public List<String> enableStudent(@PathVariable String ids) {
|
|
List<Long> studentIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
List<Long> studentIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
@@ -153,7 +153,7 @@ public class StudentController extends ControllerSupport {
|
|
* @return
|
|
* @return
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "禁用学生")
|
|
@ApiOperation(value = "禁用学生")
|
|
- @PutMapping("/disable/{ids}")
|
|
|
|
|
|
+ @PutMapping("disable/{ids}")
|
|
public List<String> disableStudent(@PathVariable String ids) {
|
|
public List<String> disableStudent(@PathVariable String ids) {
|
|
List<Long> studentIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
List<Long> studentIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
@@ -168,7 +168,7 @@ public class StudentController extends ControllerSupport {
|
|
}
|
|
}
|
|
|
|
|
|
@ApiOperation(value = "重置用户密码", notes = "重置密码")
|
|
@ApiOperation(value = "重置用户密码", notes = "重置密码")
|
|
- @PutMapping("/resetPass/{ids}")
|
|
|
|
|
|
+ @PutMapping("resetPass/{ids}")
|
|
public void resetPassword(@PathVariable String ids) {
|
|
public void resetPassword(@PathVariable String ids) {
|
|
List<Long> studentIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
List<Long> studentIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|