WANG il y a 6 ans
Parent
commit
ee8dbd1f15

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

@@ -23,6 +23,7 @@ import org.springframework.transaction.annotation.Transactional;
 import org.springframework.web.bind.annotation.DeleteMapping;
 import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
 import org.springframework.web.bind.annotation.PutMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
 import org.springframework.web.bind.annotation.RequestParam;
@@ -488,23 +489,7 @@ public class StudentController extends ControllerSupport {
 	}
 
 	@ApiOperation(value = "解绑学号", notes = "")
-	@PutMapping("unbindStudentCode/{ids}")
-	public void unbindStudentCode(@PathVariable String ids) {
-		List<Long> studentIds = Stream.of(ids.split(",")).map(s -> Long.parseLong(s.trim()))
-				.collect(Collectors.toList());
-		for (Long cur : studentIds) {
-			StudentEntity s = GlobalHelper.getEntity(studentRepo, cur, StudentEntity.class);
-			if (null == s) {
-				throw new StatusException("450110", "学生不存在");
-			}
-			validateRootOrgIsolation(s.getRootOrgId());
-
-			studentService.unbindStudentCode(s.getRootOrgId(), null, s.getIdentityNumber());
-		}
-	}
-
-	@ApiOperation(value = "解绑学号", notes = "")
-	@PutMapping("unbindStudentCode")
+	@PostMapping("unbindStudentCode")
 	public List<Long> unbindStudentCode(@RequestParam(required = false) String studentCode,
 			@RequestParam(required = false) String identityNumber,
 			@RequestParam(required = true) Long rootOrgId) {