From 82223863ef1e95aca19b72ab326a0e854d30ae7c Mon Sep 17 00:00:00 2001
From: yanghui <2536613402@qq.com>
Date: 星期二, 11 十月 2022 14:34:14 +0800
Subject: [PATCH] Merge branch '20221008' into local_20221010

---
 springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxXCXTempSend.java |   17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diff --git a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxXCXTempSend.java b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxXCXTempSend.java
index b042c3e..923e426 100644
--- a/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxXCXTempSend.java
+++ b/springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/utlis/WxXCXTempSend.java
@@ -120,7 +120,22 @@
         }
         return accessToken;
     }
-
+    public String getWsAccessToken() throws Exception {
+        String accessToken = "0";
+        try {
+            log.info("获取微信token参数:appid=" + APP_ID + ",appSecret=" + APP_SECRET);
+            String accessTokenUrl = ACCESS_TOKEN_URL + "&appid=wx98d62711dfbd8425"+ "&secret=97a2a10b990c2774ed279724337b5337";
+            String result = HttpClientUtil.httpGet(accessTokenUrl, null, null);
+            Map<String, Object> resultMap = JSON.parseObject(result, Map.class);
+            if (resultMap.containsKey("access_token")) {
+                accessToken = resultMap.get("access_token").toString();
+            }
+        } catch (IOException ioe) {
+            log.error("小程序http请求异常");
+            ioe.printStackTrace();
+        }
+        return accessToken;
+    }
     /**
      * 获取西区社区通微信token
      * @return  西区社区通微信token

--
Gitblit v1.7.1