From 3c61eba2607cc7ced8d6cd8703f1946a1f67a609 Mon Sep 17 00:00:00 2001 From: wzy <wzy19931122ai@163.com> Date: Mon, 28 Mar 2022 23:02:01 +0800 Subject: [PATCH] fix --- zq-erp/src/main/java/com/matrix/system/shopXcx/api/WeChatGzhApiTools.java | 28 ++-------------------------- 1 files changed, 2 insertions(+), 26 deletions(-) diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/WeChatGzhApiTools.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/WeChatGzhApiTools.java index 02d0c65..15952e4 100644 --- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/WeChatGzhApiTools.java +++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/WeChatGzhApiTools.java @@ -4,7 +4,6 @@ import com.matrix.component.tools.HttpResponse; import com.matrix.core.exception.GlobleException; import com.matrix.core.tools.LogUtil; -import com.matrix.core.tools.PropertiesUtil; import com.matrix.core.tools.StringUtils; import net.sf.json.JSONObject; @@ -43,29 +42,6 @@ - /** - * 获取公众号APPId - * @return - */ - public static String getAppid(){ - if(StringUtils.isBlank(appid)){ - appid = PropertiesUtil.getString(GZH_APPID); - } - return appid; - } - - /** - * 获取公众号秘钥 - * @return - */ - public static String getSecret(){ - if(StringUtils.isBlank(secret)){ - secret = PropertiesUtil.getString(GZH_SECRET); - } - return secret; - } - - /** * 清空token @@ -92,8 +68,8 @@ throw new GlobleException(e.getMessage()); } JSONObject json = JSONObject.fromObject(result.getDataString()); - String errmsg=json.getString("errmsg"); - if(StringUtils.isNotBlank(errmsg)){ + + if(json.has("errmsg")){ throw new GlobleException("获取返回刷新的accessToken失败"+json.toString()); }else{ String access_token = json.getString("access_token"); -- Gitblit v1.9.1