From 8f0d649d83de955cfcbf38ebdbfc90a70c6ac547 Mon Sep 17 00:00:00 2001
From: whycq <913841844@qq.com>
Date: 星期三, 11 十月 2023 10:24:28 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/bfasrs6' into bfasrs6

---
 src/main/java/com/zy/common/web/BaseController.java |   25 +++++++++++++++++++++++++
 1 files changed, 25 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/zy/common/web/BaseController.java b/src/main/java/com/zy/common/web/BaseController.java
index 60d9fc1..8f1fade 100644
--- a/src/main/java/com/zy/common/web/BaseController.java
+++ b/src/main/java/com/zy/common/web/BaseController.java
@@ -142,4 +142,29 @@
             wrapper.like(columns.get(i), condition);
         }
     }
+
+    public static boolean isJSON(String str) {
+        if (Cools.isEmpty(str)) {
+            return false;
+        } else {
+            str = str.trim();
+            if (str.startsWith("{") && str.endsWith("}")) {
+                return true;
+            } else if (str.startsWith("[") && str.endsWith("]")) {
+                return true;
+            } else {
+                return false;
+            }
+        }
+    }
+
+    public static boolean isNumber(String str){
+        for (int i = str.length();--i>=0;){
+            if (!Character.isDigit(str.charAt(i))){
+                return false;
+            }
+        }
+        return true;
+    }
+
 }

--
Gitblit v1.9.1