Selaa lähdekoodia

wechat store config

java110 3 vuotta sitten
vanhempi
commit
a31e79f8a0

+ 3 - 0
java110-utils/src/main/java/com/java110/utils/constant/MappingConstant.java

@@ -23,6 +23,9 @@ public final class MappingConstant {
     // 平台URL
     public static final String URL_DOMAIN ="URL_DOMAIN";
 
+    // 微信商户
+    public static final String WECHAT_STORE_DOMAIN ="WECHAT_STORE";
+
     public  static final String KEY_LOG_ON_OFF = "LOG_ON_OFF";
 
     public  static final String KEY_COST_TIME_ON_OFF = "COST_TIME_ON_OFF";

+ 2 - 2
service-acct/src/main/java/com/java110/acct/payment/adapt/alipay/AliPaymentFactoryAdapt.java

@@ -266,8 +266,8 @@ public class AliPaymentFactoryAdapt implements IPaymentFactoryAdapt {
             smallWeChatDto = new SmallWeChatDto();
             smallWeChatDto.setAppId(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appId"));
             smallWeChatDto.setAppSecret(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appSecret"));
-            smallWeChatDto.setMchId(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "mchId"));
-            smallWeChatDto.setPayPassword(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "key"));
+            smallWeChatDto.setMchId(MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "mchId"));
+            smallWeChatDto.setPayPassword(MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "key"));
             return smallWeChatDto;
         }
 

+ 2 - 2
service-acct/src/main/java/com/java110/acct/payment/adapt/chinaUms/ChinaUmsPaymentFactoryAdapt.java

@@ -280,8 +280,8 @@ public class ChinaUmsPaymentFactoryAdapt implements IPaymentFactoryAdapt {
             smallWeChatDto = new SmallWeChatDto();
             smallWeChatDto.setAppId(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appId"));
             smallWeChatDto.setAppSecret(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appSecret"));
-            smallWeChatDto.setMchId(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "mchId"));
-            smallWeChatDto.setPayPassword(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "key"));
+            smallWeChatDto.setMchId(MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "mchId"));
+            smallWeChatDto.setPayPassword(MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "key"));
             return smallWeChatDto;
         }
 

+ 2 - 2
service-acct/src/main/java/com/java110/acct/payment/adapt/fuiou/FuiouPaymentFactoryAdapt.java

@@ -294,8 +294,8 @@ public class FuiouPaymentFactoryAdapt implements IPaymentFactoryAdapt {
             smallWeChatDto = new SmallWeChatDto();
             smallWeChatDto.setAppId(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appId"));
             smallWeChatDto.setAppSecret(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appSecret"));
-            smallWeChatDto.setMchId(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "mchId"));
-            smallWeChatDto.setPayPassword(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "key"));
+            smallWeChatDto.setMchId(MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "mchId"));
+            smallWeChatDto.setPayPassword(MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "key"));
             return smallWeChatDto;
         }
 

+ 2 - 2
service-acct/src/main/java/com/java110/acct/payment/adapt/icbc/IcbcPaymentFactoryAdapt.java.txt

@@ -369,8 +369,8 @@ public class IcbcPaymentFactoryAdapt implements IPaymentFactoryAdapt {
             smallWeChatDto = new SmallWeChatDto();
             smallWeChatDto.setAppId(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appId"));
             smallWeChatDto.setAppSecret(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appSecret"));
-            smallWeChatDto.setMchId(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "mchId"));
-            smallWeChatDto.setPayPassword(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "key"));
+            smallWeChatDto.setMchId(MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "mchId"));
+            smallWeChatDto.setPayPassword(MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "key"));
             return smallWeChatDto;
         }
 

+ 2 - 2
service-acct/src/main/java/com/java110/acct/payment/adapt/pingan/PinganPaymentFactoryAdapt.java

@@ -276,8 +276,8 @@ public class PinganPaymentFactoryAdapt implements IPaymentFactoryAdapt {
             smallWeChatDto = new SmallWeChatDto();
             smallWeChatDto.setAppId(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appId"));
             smallWeChatDto.setAppSecret(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appSecret"));
-            smallWeChatDto.setMchId(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "mchId"));
-            smallWeChatDto.setPayPassword(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "key"));
+            smallWeChatDto.setMchId(MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "mchId"));
+            smallWeChatDto.setPayPassword(MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "key"));
             return smallWeChatDto;
         }
 

+ 2 - 2
service-acct/src/main/java/com/java110/acct/payment/adapt/plutus/PlutusPaymentFactoryAdapt.java

@@ -279,8 +279,8 @@ public class PlutusPaymentFactoryAdapt implements IPaymentFactoryAdapt {
             smallWeChatDto = new SmallWeChatDto();
             smallWeChatDto.setAppId(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appId"));
             smallWeChatDto.setAppSecret(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appSecret"));
-            smallWeChatDto.setMchId(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "mchId"));
-            smallWeChatDto.setPayPassword(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "key"));
+            smallWeChatDto.setMchId(MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "mchId"));
+            smallWeChatDto.setPayPassword(MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "key"));
             return smallWeChatDto;
         }
 

+ 2 - 2
service-acct/src/main/java/com/java110/acct/payment/adapt/wechat/WechatPaymentFactoryAdapt.java

@@ -305,8 +305,8 @@ public class WechatPaymentFactoryAdapt implements IPaymentFactoryAdapt {
             smallWeChatDto = new SmallWeChatDto();
             smallWeChatDto.setAppId(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appId"));
             smallWeChatDto.setAppSecret(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appSecret"));
-            smallWeChatDto.setMchId(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "mchId"));
-            smallWeChatDto.setPayPassword(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "key"));
+            smallWeChatDto.setMchId(MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "mchId"));
+            smallWeChatDto.setPayPassword(MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "key"));
             return smallWeChatDto;
         }
 

+ 2 - 1
service-acct/src/main/java/com/java110/acct/smo/impl/QrCodePlutusPaymentAdapt.java

@@ -9,6 +9,7 @@ import com.java110.core.factory.PlutusFactory;
 import com.java110.dto.smallWeChat.SmallWeChatDto;
 import com.java110.intf.store.ISmallWeChatInnerServiceSMO;
 import com.java110.utils.cache.MappingCache;
+import com.java110.utils.constant.MappingConstant;
 import com.java110.utils.constant.WechatConstant;
 import com.java110.utils.util.PayUtil;
 import com.java110.vo.ResultVo;
@@ -72,7 +73,7 @@ public class QrCodePlutusPaymentAdapt implements IQrCodePaymentSMO {
             shopSmallWeChatDto.setObjId(communityId);
             shopSmallWeChatDto.setAppId(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appId"));
             shopSmallWeChatDto.setAppSecret(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "appSecret"));
-            shopSmallWeChatDto.setMchId(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "mchId"));
+            shopSmallWeChatDto.setMchId(MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "mchId"));
             shopSmallWeChatDto.setPayPassword(MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "payPassword"));
         } else {
             shopSmallWeChatDto = smallWeChatDtos.get(0);

+ 2 - 1
service-api/src/main/java/com/java110/api/properties/WechatAuthProperties.java

@@ -2,6 +2,7 @@ package com.java110.api.properties;
 
 
 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;
@@ -84,7 +85,7 @@ public class WechatAuthProperties {
     }
 
     public String getKey() {
-        String keyCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "key");
+        String keyCache = MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "key");
         if (!StringUtil.isEmpty(keyCache)) {
             return keyCache;
         }

+ 2 - 2
service-job/src/main/java/com/java110/job/adapt/fee/ReturnPayFeeMoneyAdapt.java

@@ -128,9 +128,9 @@ public class ReturnPayFeeMoneyAdapt extends DatabusAdaptImpl {
         smallWeChatDto.setAppId(onlinePayDtos.get(0).getAppId());
         List<SmallWeChatDto> smallWeChatDtos = smallWechatV1InnerServiceSMOImpl.querySmallWechats(smallWeChatDto);
         if (smallWeChatDto == null || smallWeChatDtos.size() <= 0) {
-            payPassword = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "key");
+            payPassword = MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "key");
             certData = MappingCache.getRemark(WechatConstant.WECHAT_DOMAIN, "cert");
-            mchPassword = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "mchId");
+            mchPassword = MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "mchId");
         } else {
             payPassword = smallWeChatDtos.get(0).getPayPassword();
             certData = smallWeChatDtos.get(0).getCertPath();

+ 2 - 1
service-job/src/main/java/com/java110/job/adapt/fee/ReturnPayFeeToPlutusAdapt.java

@@ -17,6 +17,7 @@ import com.java110.intf.store.ISmallWeChatInnerServiceSMO;
 import com.java110.job.adapt.DatabusAdaptImpl;
 import com.java110.po.onlinePay.OnlinePayPo;
 import com.java110.utils.cache.MappingCache;
+import com.java110.utils.constant.MappingConstant;
 import com.java110.utils.constant.WechatConstant;
 import com.java110.utils.util.BeanConvertUtil;
 import com.java110.utils.util.PayUtil;
@@ -122,7 +123,7 @@ public class ReturnPayFeeToPlutusAdapt extends DatabusAdaptImpl {
         if (smallWeChatDtos == null || smallWeChatDtos.size() < 1) {
             privateKey = MappingCache.getRemark(WechatConstant.WECHAT_DOMAIN, "PLUTUS_PRIVATE_KEY");
             devId = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "PLUTUS_DEV_ID");
-            payPassword = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "key");
+            payPassword = MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "key");
             publicKey = MappingCache.getRemark(WechatConstant.WECHAT_DOMAIN, "PLUTUS_PUBLIC_KEY");
         } else {
             privateKey = CommunitySettingFactory.getRemark(smallWeChatDtos.get(0).getObjId(), "PLUTUS_PRIVATE_KEY");

+ 3 - 2
springboot/src/main/java/com/java110/boot/properties/WechatAuthProperties.java

@@ -2,6 +2,7 @@ package com.java110.boot.properties;
 
 
 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;
@@ -84,7 +85,7 @@ public class WechatAuthProperties {
     }
 
     public String getKey() {
-        String keyCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "key");
+        String keyCache = MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "key");
         if (!StringUtil.isEmpty(keyCache)) {
             return keyCache;
         }
@@ -97,7 +98,7 @@ public class WechatAuthProperties {
     }
 
     public String getMchId() {
-        String mchIdCache = MappingCache.getValue(WechatConstant.WECHAT_DOMAIN, "mchId");
+        String mchIdCache = MappingCache.getValue(MappingConstant.WECHAT_STORE_DOMAIN, "mchId");
         if (!StringUtil.isEmpty(mchIdCache)) {
             return mchIdCache;
         }