| | |
| | | package com.java110.api.properties; |
| | | |
| | | |
| | | 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; |
| | | import org.springframework.context.annotation.PropertySource; |
| | | import org.springframework.stereotype.Component; |
| | |
| | | } |
| | | |
| | | public String getAppId() { |
| | | String appIdCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appId"); |
| | | if (!StringUtil.isEmpty(appIdCache)) { |
| | | return appIdCache; |
| | | } |
| | | return appId; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | public String getSecret() { |
| | | |
| | | String appSecretCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appSecret"); |
| | | if (!StringUtil.isEmpty(appSecretCache)) { |
| | | return appSecretCache; |
| | | } |
| | | return secret; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | 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; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | public String getWxNotifyUrl() { |
| | | |
| | | String wxNotifyUrlCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "wxNotifyUrl"); |
| | | if (!StringUtil.isEmpty(wxNotifyUrlCache)) { |
| | | return UrlCache.getOwnerUrl()+wxNotifyUrlCache; |
| | | } |
| | | return wxNotifyUrl; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | public String getWechatAppId() { |
| | | String wechatAppIdCache = MappingCache.getValue(MappingConstant.MALL_WECHAT_DOMAIN, "wechatAppId"); |
| | | if (!StringUtil.isEmpty(wechatAppIdCache)) { |
| | | return wechatAppIdCache; |
| | | } |
| | | return wechatAppId; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | public String getWechatAppSecret() { |
| | | String wechatAppSecretCache = MappingCache.getValue(MappingConstant.MALL_WECHAT_DOMAIN, "wechatAppSecret"); |
| | | if (!StringUtil.isEmpty(wechatAppSecretCache)) { |
| | | return wechatAppSecretCache; |
| | | } |
| | | return wechatAppSecret; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | public String getRentingNotifyUrl() { |
| | | String rentingNotifyUrlCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "rentingNotifyUrl"); |
| | | if (!StringUtil.isEmpty(rentingNotifyUrlCache)) { |
| | | return UrlCache.getMallAppUrl()+rentingNotifyUrlCache; |
| | | } |
| | | return rentingNotifyUrl; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | public String getOweFeeNotifyUrl() { |
| | | String oweFeeNotifyUrlCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "oweFeeNotifyUrl"); |
| | | if (!StringUtil.isEmpty(oweFeeNotifyUrlCache)) { |
| | | return UrlCache.getOwnerUrl()+oweFeeNotifyUrlCache; |
| | | } |
| | | return oweFeeNotifyUrl; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | public String getGoodsNotifyUrl() { |
| | | String goodsNotifyUrlCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "goodsNotifyUrl"); |
| | | if (!StringUtil.isEmpty(goodsNotifyUrlCache)) { |
| | | return UrlCache.getMallAppUrl()+goodsNotifyUrlCache; |
| | | } |
| | | return goodsNotifyUrl; |
| | | } |
| | | |
| | |
| | | } |
| | | |
| | | public String getTempCarFeeNotifyUrl() { |
| | | String tempCarFeeNotifyUrlCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "tempCarFeeNotifyUrl"); |
| | | if (!StringUtil.isEmpty(tempCarFeeNotifyUrlCache)) { |
| | | return UrlCache.getOwnerUrl()+ tempCarFeeNotifyUrlCache; |
| | | } |
| | | return tempCarFeeNotifyUrl; |
| | | } |
| | | |