From 3dc1c08ac371052e92d7de2bdf949a64b6c00858 Mon Sep 17 00:00:00 2001 From: Saturneric Date: Tue, 17 Mar 2020 18:57:19 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E6=B3=A8=E5=86=8C=E6=8E=A5?= =?UTF-8?q?=E5=8F=A3=E5=AF=B9=E5=B7=B2=E6=B3=A8=E5=86=8C=E5=AD=A6=E5=8F=B7?= =?UTF-8?q?=E7=9A=84=E6=A3=80=E6=9F=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../com/codesdream/ase/controller/RegisterController.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/codesdream/ase/controller/RegisterController.java b/src/main/java/com/codesdream/ase/controller/RegisterController.java index acfd087..77b126b 100644 --- a/src/main/java/com/codesdream/ase/controller/RegisterController.java +++ b/src/main/java/com/codesdream/ase/controller/RegisterController.java @@ -67,7 +67,12 @@ public class RegisterController { // 检查用户的基本信息是否录入系统 if(!baseInformationService.checkStudentInfo(student_id)) + return quickJSONRespond.getRespond500("StudentID Base Information Not Found"); + + // 检查学号是否已被注册 + if(userService.checkIfUserExists(userService.getUsernameByStudentId(student_id)).getKey()){ return quickJSONRespond.getRespond500("StudentID Already Used"); + } // 查找对应的基本信息 BaseStudentInfo studentInfo = baseInformationService.findStudentInfoByStudentId(student_id);