wangwei 7 rokov pred
rodič
commit
773d1e7609

+ 2 - 2
examcloud-core-basic-service/src/main/java/cn/com/qmth/examcloud/core/basic/service/impl/AuthServiceImpl.java

@@ -105,7 +105,7 @@ public class AuthServiceImpl implements AuthService {
 			if (null == userEntity) {
 				throw new StatusException("B-001004", "用户不存在");
 			}
-			if (!userEntity.getEnable()) {
+			if (null != userEntity.getEnable() && !userEntity.getEnable()) {
 				throw new StatusException("B-001005", "账户被禁用");
 			}
 			String rightPassword = userEntity.getPassword();
@@ -136,7 +136,7 @@ public class AuthServiceImpl implements AuthService {
 			if (null == student) {
 				throw new StatusException("B-001110", "学生不存在");
 			}
-			if (!student.getEnable()) {
+			if (null != student.getEnable() && !student.getEnable()) {
 				throw new StatusException("B-001005", "账户被禁用");
 			}
 			String rightPassword = student.getPassword();