From 51ce83e7281815c9c1aec9006aaeef6609ad86d7 Mon Sep 17 00:00:00 2001
From: luxiaotao1123 <t1341870251@63.com>
Date: 星期五, 16 十二月 2022 10:36:40 +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