From a0a5a261290e2a4fe2351b20d5efca3bab22d8e7 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期二, 13 十二月 2022 16:10:48 +0800
Subject: [PATCH] #
---
src/main/java/com/zy/common/web/BaseController.java | 16 ++++++++++++++++
1 files changed, 16 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..a61e965 100644
--- a/src/main/java/com/zy/common/web/BaseController.java
+++ b/src/main/java/com/zy/common/web/BaseController.java
@@ -1,5 +1,6 @@
package com.zy.common.web;
+import com.alibaba.fastjson.JSON;
import com.baomidou.mybatisplus.annotations.TableField;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.plugins.Page;
@@ -142,4 +143,19 @@
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;
+ }
+ }
+ }
}
--
Gitblit v1.9.1