From 1d23adb2fa62ab836aca1a6d47f8a5ab5b12938f Mon Sep 17 00:00:00 2001
From: lohir <3399054449@qq.com>
Date: 星期四, 17 十月 2024 15:35:11 +0800
Subject: [PATCH] 优化考试时间创建和修改会向后推8小时的问题

---
 src/main/java/com/ycl/jxkg/enums/QuestionTypeEnum.java |   13 ++++++++++++-
 1 files changed, 12 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/ycl/jxkg/enums/QuestionTypeEnum.java b/src/main/java/com/ycl/jxkg/enums/QuestionTypeEnum.java
index 2be650a..1f9370a 100644
--- a/src/main/java/com/ycl/jxkg/enums/QuestionTypeEnum.java
+++ b/src/main/java/com/ycl/jxkg/enums/QuestionTypeEnum.java
@@ -54,6 +54,17 @@
         return name;
     }
 
-
+    public static Integer get(String text){
+        if("".equals(text) || text == null){
+            return null;
+        }
+        QuestionTypeEnum[] enums = QuestionTypeEnum.values();
+        for (QuestionTypeEnum anEnum : enums) {
+            if(anEnum.getName().equals(text)){
+                return anEnum.getCode();
+            }
+        }
+        return null;
+    }
 
 }

--
Gitblit v1.8.0