From 2b919980a8c70554a64cb3d03cc95679af4d817f Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: 星期一, 03 七月 2023 00:22:16 +0800
Subject: [PATCH] Merge branch 'master' of http://git.homecommunity.cn/supervip/MicroCommunity

---
 service-api/src/main/java/com/java110/api/properties/WechatAuthProperties.java |   39 ++++++++++++++++++++++++++++++++++-----
 1 files changed, 34 insertions(+), 5 deletions(-)

diff --git a/service-api/src/main/java/com/java110/api/properties/WechatAuthProperties.java b/service-api/src/main/java/com/java110/api/properties/WechatAuthProperties.java
index e56f872..6d41961 100644
--- a/service-api/src/main/java/com/java110/api/properties/WechatAuthProperties.java
+++ b/service-api/src/main/java/com/java110/api/properties/WechatAuthProperties.java
@@ -2,6 +2,8 @@
 
 
 import com.java110.utils.cache.MappingCache;
+import com.java110.utils.cache.UrlCache;
+import com.java110.utils.constant.MappingConstant;
 import com.java110.utils.constant.WechatConstant;
 import com.java110.utils.util.StringUtil;
 import org.springframework.boot.context.properties.ConfigurationProperties;
@@ -51,6 +53,10 @@
     }
 
     public String getAppId() {
+        String appIdCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appId");
+        if (!StringUtil.isEmpty(appIdCache)) {
+            return appIdCache;
+        }
         return appId;
     }
 
@@ -59,6 +65,11 @@
     }
 
     public String getSecret() {
+
+        String appSecretCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appSecret");
+        if (!StringUtil.isEmpty(appSecretCache)) {
+            return appSecretCache;
+        }
         return secret;
     }
 
@@ -75,14 +86,23 @@
     }
 
     public String getKey() {
+        String keyCache = MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "key");
+        if (!StringUtil.isEmpty(keyCache)) {
+            return keyCache;
+        }
         return key;
     }
 
     public void setKey(String key) {
+
         this.key = key;
     }
 
     public String getMchId() {
+        String mchIdCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "mchId");
+        if (!StringUtil.isEmpty(mchIdCache)) {
+            return mchIdCache;
+        }
         return mchId;
     }
 
@@ -99,9 +119,10 @@
     }
 
     public String getWxNotifyUrl() {
+
         String wxNotifyUrlCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "wxNotifyUrl");
         if (!StringUtil.isEmpty(wxNotifyUrlCache)) {
-            return wxNotifyUrlCache;
+            return UrlCache.getOwnerUrl()+wxNotifyUrlCache;
         }
         return wxNotifyUrl;
     }
@@ -111,6 +132,10 @@
     }
 
     public String getWechatAppId() {
+        String wechatAppIdCache = MappingCache.getValue(MappingConstant.MALL_WECHAT_DOMAIN, "wechatAppId");
+        if (!StringUtil.isEmpty(wechatAppIdCache)) {
+            return wechatAppIdCache;
+        }
         return wechatAppId;
     }
 
@@ -119,6 +144,10 @@
     }
 
     public String getWechatAppSecret() {
+        String wechatAppSecretCache = MappingCache.getValue(MappingConstant.MALL_WECHAT_DOMAIN, "wechatAppSecret");
+        if (!StringUtil.isEmpty(wechatAppSecretCache)) {
+            return wechatAppSecretCache;
+        }
         return wechatAppSecret;
     }
 
@@ -137,7 +166,7 @@
     public String getRentingNotifyUrl() {
         String rentingNotifyUrlCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "rentingNotifyUrl");
         if (!StringUtil.isEmpty(rentingNotifyUrlCache)) {
-            return rentingNotifyUrlCache;
+            return UrlCache.getMallAppUrl()+rentingNotifyUrlCache;
         }
         return rentingNotifyUrl;
     }
@@ -149,7 +178,7 @@
     public String getOweFeeNotifyUrl() {
         String oweFeeNotifyUrlCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "oweFeeNotifyUrl");
         if (!StringUtil.isEmpty(oweFeeNotifyUrlCache)) {
-            return oweFeeNotifyUrlCache;
+            return UrlCache.getOwnerUrl()+oweFeeNotifyUrlCache;
         }
         return oweFeeNotifyUrl;
     }
@@ -161,7 +190,7 @@
     public String getGoodsNotifyUrl() {
         String goodsNotifyUrlCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "goodsNotifyUrl");
         if (!StringUtil.isEmpty(goodsNotifyUrlCache)) {
-            return goodsNotifyUrlCache;
+            return UrlCache.getMallAppUrl()+goodsNotifyUrlCache;
         }
         return goodsNotifyUrl;
     }
@@ -173,7 +202,7 @@
     public String getTempCarFeeNotifyUrl() {
         String tempCarFeeNotifyUrlCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "tempCarFeeNotifyUrl");
         if (!StringUtil.isEmpty(tempCarFeeNotifyUrlCache)) {
-            return tempCarFeeNotifyUrlCache;
+            return UrlCache.getOwnerUrl()+ tempCarFeeNotifyUrlCache;
         }
         return tempCarFeeNotifyUrl;
     }

--
Gitblit v1.8.0