From 6c235963d6fc46b38ea59d9b19c6519b892e080b Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Mon, 16 May 2022 09:42:06 +0800
Subject: [PATCH] 20220516 逻辑删除,更新字段IS_Delete字段为已删除,默认为空,删除后其余信息从查询中过滤了
---
zq-erp/src/main/java/com/matrix/system/shopXcx/api/WeChatApiTools.java | 33 +++++++++++++++++++++++++++++----
1 files changed, 29 insertions(+), 4 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..e002b34 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,8 +58,23 @@
* @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);
+ }
+
+ /**
+ * 获取管理端小程序登录地址
+ *
+ * @param code
+ * @return
+ */
+ public String getManagerXcxLoginUrl(String code) {
+ String wechatLoginUrl = wecharLoginUrl;
+ String appId =xcxManagerAppid;
+ String secret = xcxManagerSecret;
+
+ return String.format(wechatLoginUrl, appId, secret, code);
}
/**
@@ -67,8 +94,6 @@
BusParameterSettings secret = busParameterSettingsDao.selectCompanyParamByCode(AppConstance.MINIPROGRAM_SECRET, companyId);
return secret.getParamValue();
}
-
-
/**
* 清空token
--
Gitblit v1.9.1