java110
2023-01-30 a31e79f8a020cdcfa7105a11d907abe7e4e3cfff
service-api/src/main/java/com/java110/api/properties/WechatAuthProperties.java
@@ -2,6 +2,7 @@
import com.java110.utils.cache.MappingCache;
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 +52,10 @@
    }
    public String getAppId() {
        String appIdCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appId");
        if (!StringUtil.isEmpty(appIdCache)) {
            return appIdCache;
        }
        return appId;
    }
@@ -59,6 +64,11 @@
    }
    public String getSecret() {
        String appSecretCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appSecret");
        if (!StringUtil.isEmpty(appSecretCache)) {
            return appSecretCache;
        }
        return secret;
    }
@@ -75,14 +85,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;
    }
@@ -111,6 +130,10 @@
    }
    public String getWechatAppId() {
        String wechatAppIdCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "wechatAppId");
        if (!StringUtil.isEmpty(wechatAppIdCache)) {
            return wechatAppIdCache;
        }
        return wechatAppId;
    }
@@ -119,6 +142,10 @@
    }
    public String getWechatAppSecret() {
        String wechatAppSecretCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "wechatAppSecret");
        if (!StringUtil.isEmpty(wechatAppSecretCache)) {
            return wechatAppSecretCache;
        }
        return wechatAppSecret;
    }