diff --git a/src/main/java/com/biutag/supervision/constants/enums/InitialPetition.java b/src/main/java/com/biutag/supervision/constants/enums/InitialPetition.java
index e958976..8de6cca 100644
--- a/src/main/java/com/biutag/supervision/constants/enums/InitialPetition.java
+++ b/src/main/java/com/biutag/supervision/constants/enums/InitialPetition.java
@@ -20,4 +20,19 @@ public enum InitialPetition {
public String label;
+ public static String getValue(String str) {
+ if ("初".equals(str)) {
+ return THE_FIRST.getValue();
+ }
+ if ("重".equals(str)) {
+ return REPEAT.getValue();
+ }
+ for (InitialPetition value : values()) {
+ if (value.getLabel().equals(str)) {
+ return value.getValue();
+ }
+ }
+ return null;
+ }
+
}
\ No newline at end of file
diff --git a/src/main/java/com/biutag/supervision/controller/AuthController.java b/src/main/java/com/biutag/supervision/controller/AuthController.java
index 55b570b..695e60b 100644
--- a/src/main/java/com/biutag/supervision/controller/AuthController.java
+++ b/src/main/java/com/biutag/supervision/controller/AuthController.java
@@ -67,6 +67,9 @@ public class AuthController {
redisTemplate.opsForValue().set(String.format(RedisKeyConstants.LOGIN_USERINFO_KEY, authorization), user, 24, TimeUnit.HOURS);
}
}
+ if (Objects.isNull(user)) {
+ throw new AuthException();
+ }
boolean superFlag = AppConstants.USER_TYPE_SUPER.equals(user.getUserType());
List