wangwei 6 ani în urmă
părinte
comite
1a5e7b0c1c

+ 3 - 3
examcloud-core-examwork-api-provider/src/main/java/cn/com/qmth/examcloud/core/examwork/api/controller/ExamController.java

@@ -375,9 +375,9 @@ public class ExamController extends ControllerSupport {
 	 * @return
 	 */
 	@ApiOperation(value = "按ID删除考试批次", notes = "删除")
-	@DeleteMapping("{id}")
-	public List<Long> deleteExam(@PathVariable String id) {
-		List<Long> examIds = Stream.of(id.split(",")).map(s -> Long.parseLong(s.trim()))
+	@DeleteMapping("{ids}")
+	public List<Long> deleteExam(@PathVariable String ids) {
+		List<Long> examIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
 				.collect(Collectors.toList());
 		examService.deleteExam(examIds);
 		return examIds;

+ 3 - 1
examcloud-core-examwork-service/src/main/java/cn/com/qmth/examcloud/core/examwork/service/impl/ExamServiceImpl.java

@@ -66,9 +66,11 @@ public class ExamServiceImpl implements ExamService {
 			if (exam.getBeginTime().before(new Date())) {
 				throw new StatusException("", "[ " + exam.getName() + " ] 已经开考,不能删除");
 			}
-			// 删除学习中心考试时间
+			// 删除学习中心特殊设置
 			examOrgSettingsRepo.deleteByExamId(exam.getId());
+			// 删除考生
 			examStudentService.deleteExamStudentsByExamId(exam.getId());
+			// 删除考试
 			examRepo.delete(exam);
 		}
 	}