From 2b35339fd67969df7acb8c75bfceafa1ba134b41 Mon Sep 17 00:00:00 2001 From: chenjiahe <763432473@qq.com> Date: 星期四, 11 八月 2022 14:32:11 +0800 Subject: [PATCH] 签名有效时间提升到30秒钟 --- src/main/java/com/platform/verification/ApplicationTool.java | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/platform/verification/ApplicationTool.java b/src/main/java/com/platform/verification/ApplicationTool.java index 1d35829..1d8c13e 100644 --- a/src/main/java/com/platform/verification/ApplicationTool.java +++ b/src/main/java/com/platform/verification/ApplicationTool.java @@ -3,6 +3,7 @@ import com.alibaba.fastjson.JSONObject; import com.hx.redis.RedisUtil; +import com.hx.redisson.config.RedissonUtil; import com.hx.util.DateUtil; import com.hx.util.StringUtils; import com.hx.util.rsa.RSAUtil; @@ -41,4 +42,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