From 8546b3d285af4235a0ef615a0c6e89486ae2c806 Mon Sep 17 00:00:00 2001
From: fuliqi <fuliqi@qq.com>
Date: 星期四, 17 十月 2024 21:01:37 +0800
Subject: [PATCH] 达梦不支持value改为values

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