From 2ed1199d48f7207f4a012c04f61e13ac1a8d5154 Mon Sep 17 00:00:00 2001
From: chenjiahe <763432473@qq.com>
Date: 星期四, 16 六月 2022 10:27:44 +0800
Subject: [PATCH] 新增请求安全工具

---
 src/main/java/com/hx/util/SimpleTool.java |   21 +++++++++++++++++++++
 1 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/hx/util/SimpleTool.java b/src/main/java/com/hx/util/SimpleTool.java
index 2dbfd87..fd0764b 100644
--- a/src/main/java/com/hx/util/SimpleTool.java
+++ b/src/main/java/com/hx/util/SimpleTool.java
@@ -76,6 +76,27 @@
         return map;
     }
 
+    /**
+     * 灏嗗璞¤鎹负map
+     *
+     * @param bean
+     * @return
+     */
+    public static Map<String, String> beanToMapS(Object bean) {
+        Map<String, String> map = new HashMap<>();
+        if (bean != null) {
+            BeanMap beanMap = BeanMap.create(bean);
+            for (Object key : beanMap.keySet()) {
+                if(beanMap.get(key) != null){
+                    map.put(key + "", beanMap.get(key).toString());
+                }else{
+                    map.put(key + "", "");
+                }
+            }
+        }
+        return map;
+    }
+
 
     /**
 	 * 鍚庡彴鏍煎紡鏋勫缓杩斿洖鍊兼牸寮忓垪琛�-鍚庡彴鑾峰彇鍒楄〃

--
Gitblit v1.8.0