From e4c05d381d2dadf129b3a4cb499c8ea67e7fc481 Mon Sep 17 00:00:00 2001
From: Helius <wangdoubleone@gmail.com>
Date: Mon, 08 Nov 2021 17:19:47 +0800
Subject: [PATCH] fix
---
zq-erp/src/main/java/com/matrix/system/shopXcx/api/WeChatApiTools.java | 18 ++++++++++++++++--
1 files changed, 16 insertions(+), 2 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 5befb86..8940122 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
@@ -45,9 +45,12 @@
* @param code
* @return
*/
- public String getXcxLoginUrl(String code,Long companyId) {
+ public String getXcxLoginUrl(String code,Long companyId, String type) {
String wechatLoginUrl = PropertiesUtil.getString(WECHAT_LOGIN_URL);
- return String.format(wechatLoginUrl, getAppid(companyId), getSecret(companyId), code);
+ if (AppConstance.MINIPROGRAM_APPID.equals(type)) {
+ return String.format(wechatLoginUrl, getAppid(companyId), getSecret(companyId), code);
+ } else {
+ return String.format(wechatLoginUrl, getManagerAppId(companyId), getManagerSecret(companyId), code); }
}
/**
@@ -68,6 +71,17 @@
return secret.getParamValue();
}
+ public String getManagerAppId(Long companyId) {
+ BusParameterSettings appId = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.MINI_PROGRAM_MANAGER_APP_ID, companyId);
+ return appId.getParamValue();
+ }
+
+ public String getManagerSecret(Long companyId){
+ BusParameterSettings secret = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.MINI_PROGRAM_MANAGER_SECRET, companyId);
+ return secret.getParamValue();
+ }
+
+
/**
--
Gitblit v1.9.1