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/WeChatApiTools.java |   23 +++++++++++++++++------
 1 files changed, 17 insertions(+), 6 deletions(-)

diff --git a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/WeChatApiTools.java b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/WeChatApiTools.java
index e055e95..bf1c6b8 100644
--- a/zq-erp/src/main/java/com/matrix/system/shopXcx/api/WeChatApiTools.java
+++ b/zq-erp/src/main/java/com/matrix/system/shopXcx/api/WeChatApiTools.java
@@ -3,18 +3,30 @@
 import com.matrix.component.tools.HttpRequest;
 import com.matrix.component.tools.HttpResponse;
 import com.matrix.core.tools.LogUtil;
-import com.matrix.core.tools.PropertiesUtil;
 import com.matrix.system.common.bean.BusParameterSettings;
 import com.matrix.system.common.constance.AppConstance;
 import com.matrix.system.common.dao.BusParameterSettingsDao;
 import net.sf.json.JSONObject;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import java.io.IOException;
 
 @Service
 public class WeChatApiTools {
+
+
+
+	@Value("${wechar_login_url}")
+	private String wecharLoginUrl;
+
+	@Value("${xcx_manager_appid}")
+	private String xcxManagerAppid;
+
+	@Value("${xcx_manager_secret}")
+	private String xcxManagerSecret;
+
 
 	@Autowired
 	private BusParameterSettingsDao busParameterSettingsDao;
@@ -46,7 +58,7 @@
 	 * @return
 	 */
 	public  String getXcxLoginUrl(String code,Long companyId) {
-		String wechatLoginUrl = PropertiesUtil.getString(WECHAT_LOGIN_URL);
+		String wechatLoginUrl =wecharLoginUrl;
 
 		return String.format(wechatLoginUrl, getAppid(companyId), getSecret(companyId), code);
 	}
@@ -58,10 +70,9 @@
 	 * @return
 	 */
 	public String getManagerXcxLoginUrl(String code) {
-		String wechatLoginUrl = PropertiesUtil.getString(WECHAT_LOGIN_URL);
-		String appId = PropertiesUtil.getString(AppConstance.MINI_PROGRAM_MANAGER_APP_ID);
-		String secret = PropertiesUtil.getString(AppConstance.MINI_PROGRAM_MANAGER_SECRET);
-
+		String wechatLoginUrl = wecharLoginUrl;
+		String appId =xcxManagerAppid;
+		String secret = xcxManagerSecret;
 		return String.format(wechatLoginUrl, appId, secret, code);
 	}
 

--
Gitblit v1.9.1