From 2aad5c6ca552423d1b8e6e8c869a698a15822759 Mon Sep 17 00:00:00 2001
From: fhx <308050795@qq.com>
Date: 星期二, 25 四月 2023 15:32:39 +0800
Subject: [PATCH] 1.修改redis工具

---
 src/main/java/com/hx/util/corp/CorpMpUtil.java |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/src/main/java/com/hx/util/corp/CorpMpUtil.java b/src/main/java/com/hx/util/corp/CorpMpUtil.java
index a10a8dd..8ca404e 100644
--- a/src/main/java/com/hx/util/corp/CorpMpUtil.java
+++ b/src/main/java/com/hx/util/corp/CorpMpUtil.java
@@ -2,6 +2,8 @@
 
 import com.alibaba.fastjson.JSONObject;
 import com.hx.util.HttpMethodUtil;
+import com.hx.util.StringUtils;
+import com.hx.util.corp.entity.AppLetInfo;
 import com.hx.util.corp.entity.OpenIdAUserId;
 import com.hx.util.corp.entity.WeiXinInfo;
 import org.slf4j.Logger;
@@ -29,7 +31,7 @@
     public static final String URL_USERID_TO_OPENID = "https://qyapi.weixin.qq.com/cgi-bin/user/convert_to_openid";
 
     /**鑾峰彇灏忕▼搴忛摼鎺�*/
-    public static final String URL_USERID_TO_APPLET = "https://api.weixin.qq.com/wxa/generate_urllink";
+    public static final String URL_LINK = "https://api.weixin.qq.com/wxa/generate_urllink";
 
 
     /**
@@ -83,4 +85,17 @@
         return weiXinInfo;
     }
 
+    public static AppLetInfo getAppLetUrl(String path, String token, String env_version, String query) {
+        Map<String, Object> map = new HashMap();
+        map.put("access_token", token);
+        com.alibaba.fastjson.JSONObject data = new com.alibaba.fastjson.JSONObject();
+        data.put("path", path);
+        data.put("env_version", env_version);
+        if (!StringUtils.isEmpty(query)){
+            data.put("query", query);
+        }
+        String datas = HttpMethodUtil.HttpURLUtilJson(URL_LINK, data.toString(), map, (Map)null, "POST");
+        AppLetInfo appLetInfo = com.alibaba.fastjson.JSONObject.parseObject(datas, AppLetInfo.class);
+        return appLetInfo;
+    }
 }

--
Gitblit v1.8.0