WANG 6 年之前
父节点
当前提交
f71c81b7f1

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

@@ -435,12 +435,17 @@ public class StudentController extends ControllerSupport {
 
 	@ApiOperation(value = "查询学生")
 	@GetMapping("getStudentInfo")
-	public StudentInfo getStudentInfo(@RequestParam(required = false) Long studentId,
+	public StudentInfo getStudentInfo(@RequestParam(required = false) Long rootOrgId,
+			@RequestParam(required = false) Long studentId,
 			@RequestParam(required = false) String identityNumber,
 			@RequestParam(required = false) String studentCode,
 			@RequestParam(required = false) String securityPhone) {
-		User accessUser = getAccessUser();
-		Long rootOrgId = accessUser.getRootOrgId();
+		if (null == rootOrgId) {
+			rootOrgId = getRootOrgId();
+		} else {
+			validateRootOrgIsolation(rootOrgId);
+		}
+
 		StudentInfo studentInfo = studentService.getStudentInfo(rootOrgId, studentId,
 				identityNumber, studentCode, securityPhone);
 		return studentInfo;