| | |
| | | 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; |
| | |
| | | if (Cools.isEmpty(str)) { |
| | | return false; |
| | | } else { |
| | | try { |
| | | JSON.parse(str); |
| | | str = str.trim(); |
| | | if (str.startsWith("{") && str.endsWith("}")) { |
| | | return true; |
| | | } catch (Exception e) { |
| | | } 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; |
| | | } |
| | | |
| | | } |