WANG 6 years ago
parent
commit
fd44159ff9

+ 4 - 14
examcloud-core-basic-api-provider/src/main/java/cn/com/qmth/examcloud/core/basic/api/controller/StudentController.java

@@ -260,20 +260,6 @@ public class StudentController extends ControllerSupport {
 		FileUtils.deleteQuietly(file);
 	}
 
-	/**
-	 * 方法注释
-	 *
-	 * @author WANGWEI
-	 * @param id
-	 * @return
-	 */
-	@ApiOperation(value = "按ID查询学生", notes = "ID查询")
-	@GetMapping("{id}")
-	public StudentEntity getStudentById(@PathVariable Long id) {
-		StudentEntity s = studentRepo.findOne(id);
-		return s;
-	}
-
 	/**
 	 * 方法注释
 	 *
@@ -284,6 +270,10 @@ public class StudentController extends ControllerSupport {
 	@ApiOperation(value = "按ID删除学生", notes = "删除")
 	@DeleteMapping("{id}")
 	public Long deleteStudent(@PathVariable Long id) {
+		StudentEntity s = studentRepo.findOne(id);
+		if (null != s) {
+			validateRootOrgIsolation(s.getRootOrgId());
+		}
 		studentRepo.delete(id);
 		return id;
 	}