From e26c98bd7cfde538096d74ea9019e2128b5fe313 Mon Sep 17 00:00:00 2001
From: chenjiahe <763432473@qq.com>
Date: 星期二, 16 五月 2023 10:39:24 +0800
Subject: [PATCH] 优化

---
 src/main/java/com/platform/verification/ApplicationTool.java |   30 +++++++++++++++++++++++-------
 1 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/src/main/java/com/platform/verification/ApplicationTool.java b/src/main/java/com/platform/verification/ApplicationTool.java
index 1d35829..eee9fb0 100644
--- a/src/main/java/com/platform/verification/ApplicationTool.java
+++ b/src/main/java/com/platform/verification/ApplicationTool.java
@@ -3,15 +3,9 @@
 
 import com.alibaba.fastjson.JSONObject;
 import com.hx.redis.RedisUtil;
-import com.hx.util.DateUtil;
+import com.hx.redisson.config.RedissonUtil;
 import com.hx.util.StringUtils;
-import com.hx.util.rsa.RSAUtil;
 import com.platform.entity.ThirtApplication;
-import com.platform.resultTool.PlatformCode;
-import com.platform.resultTool.PlatformResult;
-
-import java.text.SimpleDateFormat;
-import java.util.Date;
 
 /**搴旂敤杞寲
  * @author CJH
@@ -41,4 +35,26 @@
         return application;
     }
 
+    /**鑾峰彇搴旂敤鍦╮edis涓婇潰鐨勬暟鎹�
+     * @param appId 鐢ㄦ埛鐨凙PPID `
+     * @param redissonUtil RedissonUtil
+     * @return
+     */
+    public static ThirtApplication jsonToEntity(String appId, RedissonUtil redissonUtil){
+
+        if (StringUtils.isEmpty(appId)) {
+            return null;
+        }
+
+        JSONObject thirtApplication = (JSONObject) redissonUtil.get(appId);
+
+        //鏍¢獙appid鏄惁瀛樺湪
+        if(thirtApplication == null){
+            return null;
+        }
+        ThirtApplication application = JSONObject.parseObject(thirtApplication.toString(),ThirtApplication.class);
+
+        return application;
+    }
+
 }

--
Gitblit v1.8.0