From 182c1cde1f4507d12eb4b6b1a4ffd24a2be6c93b Mon Sep 17 00:00:00 2001
From: xiangpei <xiangpei@timesnew.cn>
Date: 星期三, 10 七月 2024 11:48:40 +0800
Subject: [PATCH] 初始化缓存

---
 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