From b7e1971d3e0fe1bb38eb2144c70e50817a12f19d Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期五, 24 十二月 2021 01:06:58 +0800
Subject: [PATCH] 优化 微信配置为 编码映射中配置

---
 service-api/src/main/java/com/java110/api/properties/WechatAuthProperties.java |   23 +++++++++++++++++++++++
 1 files changed, 23 insertions(+), 0 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 f88d5e6..e56f872 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
@@ -1,6 +1,9 @@
 package com.java110.api.properties;
 
 
+import com.java110.utils.cache.MappingCache;
+import com.java110.utils.constant.WechatConstant;
+import com.java110.utils.util.StringUtil;
 import org.springframework.boot.context.properties.ConfigurationProperties;
 import org.springframework.context.annotation.PropertySource;
 import org.springframework.stereotype.Component;
@@ -96,6 +99,10 @@
     }
 
     public String getWxNotifyUrl() {
+        String wxNotifyUrlCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "wxNotifyUrl");
+        if (!StringUtil.isEmpty(wxNotifyUrlCache)) {
+            return wxNotifyUrlCache;
+        }
         return wxNotifyUrl;
     }
 
@@ -128,6 +135,10 @@
     }
 
     public String getRentingNotifyUrl() {
+        String rentingNotifyUrlCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "rentingNotifyUrl");
+        if (!StringUtil.isEmpty(rentingNotifyUrlCache)) {
+            return rentingNotifyUrlCache;
+        }
         return rentingNotifyUrl;
     }
 
@@ -136,6 +147,10 @@
     }
 
     public String getOweFeeNotifyUrl() {
+        String oweFeeNotifyUrlCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "oweFeeNotifyUrl");
+        if (!StringUtil.isEmpty(oweFeeNotifyUrlCache)) {
+            return oweFeeNotifyUrlCache;
+        }
         return oweFeeNotifyUrl;
     }
 
@@ -144,6 +159,10 @@
     }
 
     public String getGoodsNotifyUrl() {
+        String goodsNotifyUrlCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "goodsNotifyUrl");
+        if (!StringUtil.isEmpty(goodsNotifyUrlCache)) {
+            return goodsNotifyUrlCache;
+        }
         return goodsNotifyUrl;
     }
 
@@ -152,6 +171,10 @@
     }
 
     public String getTempCarFeeNotifyUrl() {
+        String tempCarFeeNotifyUrlCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "tempCarFeeNotifyUrl");
+        if (!StringUtil.isEmpty(tempCarFeeNotifyUrlCache)) {
+            return tempCarFeeNotifyUrlCache;
+        }
         return tempCarFeeNotifyUrl;
     }
 

--
Gitblit v1.8.0