|
@@ -278,11 +278,10 @@ public class ExamCloudServiceProvider extends ControllerSupport implements ExamC
|
|
|
@Override
|
|
|
public LockExamStudentsResp lockExamStudents(@RequestBody LockExamStudentsReq req) {
|
|
|
|
|
|
- LockExamStudentsResp resp = new LockExamStudentsResp();
|
|
|
-
|
|
|
List<Long> examIdList = req.getExamIdList();
|
|
|
+
|
|
|
if (CollectionUtils.isEmpty(examIdList)) {
|
|
|
- return resp;
|
|
|
+ throw new StatusException("E-002003", "examIdList is empty");
|
|
|
}
|
|
|
for (Long examId : examIdList) {
|
|
|
if (null == examId) {
|
|
@@ -296,6 +295,8 @@ public class ExamCloudServiceProvider extends ControllerSupport implements ExamC
|
|
|
examRepo.save(exam);
|
|
|
}
|
|
|
|
|
|
+ LockExamStudentsResp resp = new LockExamStudentsResp();
|
|
|
+ resp.setExamIdList(examIdList);
|
|
|
return resp;
|
|
|
}
|
|
|
|
|
@@ -304,12 +305,12 @@ public class ExamCloudServiceProvider extends ControllerSupport implements ExamC
|
|
|
@Override
|
|
|
public UnlockExamStudentsResp unlockExamStudents(@RequestBody UnlockExamStudentsReq req) {
|
|
|
|
|
|
- UnlockExamStudentsResp resp = new UnlockExamStudentsResp();
|
|
|
-
|
|
|
List<Long> examIdList = req.getExamIdList();
|
|
|
+
|
|
|
if (CollectionUtils.isEmpty(examIdList)) {
|
|
|
- return resp;
|
|
|
+ throw new StatusException("E-002003", "examIdList is empty");
|
|
|
}
|
|
|
+
|
|
|
for (Long examId : examIdList) {
|
|
|
if (null == examId) {
|
|
|
throw new StatusException("E-002001", "examId is null");
|
|
@@ -322,6 +323,8 @@ public class ExamCloudServiceProvider extends ControllerSupport implements ExamC
|
|
|
examRepo.save(exam);
|
|
|
}
|
|
|
|
|
|
+ UnlockExamStudentsResp resp = new UnlockExamStudentsResp();
|
|
|
+ resp.setExamIdList(examIdList);
|
|
|
return resp;
|
|
|
}
|
|
|
|