|
@@ -456,7 +456,7 @@ public class ExamStudentController extends ControllerSupport {
|
|
|
|
|
|
@ApiOperation(value = "启用考生")
|
|
@ApiOperation(value = "启用考生")
|
|
@PutMapping("enable/{ids}")
|
|
@PutMapping("enable/{ids}")
|
|
- public List<String> enableStudent(@PathVariable String ids) {
|
|
|
|
|
|
+ public List<String> enableExamStudent(@PathVariable String ids) {
|
|
List<Long> examStuIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
List<Long> examStuIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
List<String> ret = Lists.newArrayList();
|
|
List<String> ret = Lists.newArrayList();
|
|
@@ -467,6 +467,11 @@ public class ExamStudentController extends ControllerSupport {
|
|
examStudentRepo.save(s);
|
|
examStudentRepo.save(s);
|
|
ret.add(s.getId() + ":" + s.getName());
|
|
ret.add(s.getId() + ":" + s.getName());
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ for (Long cur : examStuIds) {
|
|
|
|
+ examStudentService.syncExamStudent(cur);
|
|
|
|
+ }
|
|
|
|
+
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|
|
@@ -479,7 +484,7 @@ public class ExamStudentController extends ControllerSupport {
|
|
*/
|
|
*/
|
|
@ApiOperation(value = "禁用考生")
|
|
@ApiOperation(value = "禁用考生")
|
|
@PutMapping("disable/{ids}")
|
|
@PutMapping("disable/{ids}")
|
|
- public List<String> disableStudent(@PathVariable String ids) {
|
|
|
|
|
|
+ public List<String> disableExamStudent(@PathVariable String ids) {
|
|
List<Long> examStuIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
List<Long> examStuIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
|
|
.collect(Collectors.toList());
|
|
.collect(Collectors.toList());
|
|
List<String> ret = Lists.newArrayList();
|
|
List<String> ret = Lists.newArrayList();
|
|
@@ -490,6 +495,11 @@ public class ExamStudentController extends ControllerSupport {
|
|
examStudentRepo.save(s);
|
|
examStudentRepo.save(s);
|
|
ret.add(s.getId() + ":" + s.getName());
|
|
ret.add(s.getId() + ":" + s.getName());
|
|
}
|
|
}
|
|
|
|
+
|
|
|
|
+ for (Long cur : examStuIds) {
|
|
|
|
+ examStudentService.syncExamStudent(cur);
|
|
|
|
+ }
|
|
|
|
+
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|