Explorar el Código

修改域名地址

igl hace 2 semanas
padre
commit
e75b5d916a

+ 7 - 8
vehicle-client/src/main/java/com/chelvc/cloud/vehicle/client/constant/TradeConstant.java

@@ -1,7 +1,6 @@
 package com.chelvc.cloud.vehicle.client.constant;
 
 public interface TradeConstant {
-
     /**
      * 首信易服务商id
      */
@@ -20,7 +19,7 @@ public interface TradeConstant {
     /**
      * 服务器域名
      */
-    static final String NOTIFY_DOMAIN = "https://test.chelvc.com/api";
+    static final String NOTIFY_DOMAIN = "https://www.chelvc.com/api";
 
     /**
      *
@@ -34,12 +33,12 @@ public interface TradeConstant {
     /**
      * 提现回调通知地址
      */
-    static final String WITHDRAW_NOTIFY_URL = NOTIFY_DOMAIN + "/maintain/asset/withdraw/notify";
+    static final String WITHDRAW_NOTIFY_URL = "/maintain/asset/withdraw/notify";
 
     /**
      * 商户入网回调地址
      */
-    static final String MERCHANT_NET_IN_NOTIFY_URL = NOTIFY_DOMAIN + "/maintain/merchant/apply/notify";
+    static final String MERCHANT_NET_IN_NOTIFY_URL = "/maintain/merchant/apply/notify";
 
     /**
      * 被分账方入网
@@ -49,7 +48,7 @@ public interface TradeConstant {
     /**
      * 转账回调地址
      */
-    static final String TRANSFER_NOTIFY_URL = NOTIFY_DOMAIN + "/maintain/asset/transfer/notify";
+    static final String TRANSFER_NOTIFY_URL = "/maintain/asset/transfer/notify";
 
     /**
      * 转账地址
@@ -59,15 +58,15 @@ public interface TradeConstant {
     /**
      * 下单服务器回调地址
      */
-    static final String ORDER_NOTIFY_URL = NOTIFY_DOMAIN + "/maintain/order/notify";
+    static final String ORDER_NOTIFY_URL = "/maintain/order/notify";
     /**
      * 下单页面回调地址
      */
-    static final String ORDER_CALLBACK_URL = NOTIFY_DOMAIN + "/PageMine/orderMine/myOrder/index?requestId=%s&merchantId=%s";
+    static final String ORDER_CALLBACK_URL = "/PageMine/orderMine/myOrder/index?requestId=%s&merchantId=%s";
     /**
      * 退款回调地址
      */
-    static final String ORDER_REFUND_URL = NOTIFY_DOMAIN + "/maintain/order/refund/notify";
+    static final String ORDER_REFUND_URL = "/maintain/order/refund/notify";
     /**
      * (直连) 	微信小程序
      */

+ 5 - 2
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/AssetServiceImpl.java

@@ -31,6 +31,7 @@ import com.upay.sdk.wallet.executer.WithdrawExecuter;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 import java.math.BigDecimal;
@@ -41,6 +42,8 @@ import java.time.LocalDateTime;
 @Service
 @RequiredArgsConstructor(onConstructor = @__({@Autowired,@Lazy}))
 public class AssetServiceImpl extends ServiceImpl<AssetMapper, Asset> implements AssetService {
+    @Value("${chelvc.domain}")
+    private String NOTIFY_DOMAIN;
     private final BalanceDetailService balanceDetailService;
     private final OmsOrderService orderService;
     private final MerchantService merchantService;
@@ -192,7 +195,7 @@ public class AssetServiceImpl extends ServiceImpl<AssetMapper, Asset> implements
         builder.setRequestId(String.valueOf(withdrawId))
                 .setPartnerId(TradeConstant.PARTNER_ID)
                 .setWithdrawAmount(String.valueOf(amount.multiply(new BigDecimal("100")).longValue()))
-                .setNotifyUrl(TradeConstant.WITHDRAW_NOTIFY_URL);
+                .setNotifyUrl(NOTIFY_DOMAIN + TradeConstant.WITHDRAW_NOTIFY_URL);
         WithdrawExecuter executer = new WithdrawExecuter();
         String cause = "";
         try {
@@ -260,7 +263,7 @@ public class AssetServiceImpl extends ServiceImpl<AssetMapper, Asset> implements
         OrderBuilder builder = new OrderBuilder(TradeConstant.PARTNER_ID);
         builder.setRequestId(String.valueOf(transferId))
                 .setAmount(String.valueOf(amount.multiply(new BigDecimal("100")).longValue()))
-                .setNotifyUrl(TradeConstant.TRANSFER_NOTIFY_URL)
+                .setNotifyUrl(NOTIFY_DOMAIN + TradeConstant.TRANSFER_NOTIFY_URL)
                 .setCurrency("CNY")
                 .setReceiverId(relation.getSxyMerchantId())
                 .setRemark(remark)

+ 5 - 2
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/MerchantRelationServiceImpl.java

@@ -20,6 +20,7 @@ import com.chelvc.framework.common.exception.ResourceUnavailableException;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.context.annotation.Lazy;
 import org.springframework.stereotype.Service;
 
@@ -32,6 +33,8 @@ import java.util.UUID;
 @RequiredArgsConstructor(onConstructor = @__({@Autowired,@Lazy}))
 public class MerchantRelationServiceImpl extends ServiceImpl<MerchantRelationMapper,
         MerchantRelation> implements MerchantRelationService {
+    @Value("${chelvc.domain}")
+    private String NOTIFY_DOMAIN;
     private final MerchantService merchantService;
     private final MerchantApplyRecordService merchantApplyRecordService;
     private final MerchantAuthMapper merchantAuthMapper;
@@ -53,7 +56,7 @@ public class MerchantRelationServiceImpl extends ServiceImpl<MerchantRelationMap
         jsonObject.put("merchantId", TradeConstant.PARTNER_ID);
         jsonObject.put("requestId", requestId);
         jsonObject.put("operationType", operationType);
-        jsonObject.put("notifyUrl", TradeConstant.MERCHANT_NET_IN_NOTIFY_URL);
+        jsonObject.put("notifyUrl", NOTIFY_DOMAIN + TradeConstant.MERCHANT_NET_IN_NOTIFY_URL);
         jsonObject.put("extendedParameters", "sendActiveEmail:FALSE,sendExpressPayMsg:FALSE");
 
         //商户基本信息
@@ -165,7 +168,7 @@ public class MerchantRelationServiceImpl extends ServiceImpl<MerchantRelationMap
         jsonObject.put("merchantId", TradeConstant.PARTNER_ID);
         jsonObject.put("requestId", requestId);
         jsonObject.put("operationType", operationType);
-        jsonObject.put("notifyUrl", TradeConstant.MERCHANT_NET_IN_NOTIFY_URL);
+        jsonObject.put("notifyUrl", NOTIFY_DOMAIN + TradeConstant.MERCHANT_NET_IN_NOTIFY_URL);
         jsonObject.put("extendedParameters", "sendActiveEmail:FALSE,sendExpressPayMsg:FALSE");
 
         //商户基本信息

+ 6 - 3
vehicle-server/src/main/java/com/chelvc/cloud/vehicle/server/service/impl/OnlinePayServiceImpl.java

@@ -33,6 +33,7 @@ import com.upay.sdk.onlinepay.executer.OnlinePayOrderExecuter;
 import lombok.RequiredArgsConstructor;
 import lombok.extern.slf4j.Slf4j;
 import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.beans.factory.annotation.Value;
 import org.springframework.stereotype.Service;
 
 import java.io.IOException;
@@ -49,6 +50,8 @@ import java.util.List;
 @Service
 @RequiredArgsConstructor(onConstructor = @__(@Autowired))
 public class OnlinePayServiceImpl  implements OnlinePayService {
+    @Value("${chelvc.domain}")
+    private String NOTIFY_DOMAIN;
     private final UserClient userService;
     private final OmsOrderRefundService omsOrderRefundService;
     private final AssetService assetService;
@@ -62,8 +65,8 @@ public class OnlinePayServiceImpl  implements OnlinePayService {
         builder.setRequestId(omsOrder.getId().toString())
                 .setOrderAmount(String.valueOf(orderAmount)) //单位:分
                 .setOrderCurrency("CNY")
-                .setNotifyUrl(TradeConstant.ORDER_NOTIFY_URL)
-                .setCallbackUrl(String.format(TradeConstant.ORDER_CALLBACK_URL, requestId, TradeConstant.PARTNER_ID))
+                .setNotifyUrl(NOTIFY_DOMAIN + TradeConstant.ORDER_NOTIFY_URL)
+                .setCallbackUrl(String.format(NOTIFY_DOMAIN + TradeConstant.ORDER_CALLBACK_URL, requestId, TradeConstant.PARTNER_ID))
                 .setRemark(omsOrder.getNote())
                 .setPaymentModeCode(TradeConstant.MINIAPPS_WEIXIN_PAY_P2P)
                 //.setAuthCode("")
@@ -236,7 +239,7 @@ public class OnlinePayServiceImpl  implements OnlinePayService {
         builder.setRequestId(String.valueOf(refundId))
                 .setAmount(String.valueOf(omsOrder.getPayAmount().multiply(new BigDecimal("100")).longValue()))
                 .setOrderId(omsOrder.getOutOrderId())
-                .setNotifyUrl(TradeConstant.ORDER_REFUND_URL);
+                .setNotifyUrl(NOTIFY_DOMAIN + TradeConstant.ORDER_REFUND_URL);
         OnlinePayOrderExecuter executer = new OnlinePayOrderExecuter();
         String cause = "";
         try {

+ 3 - 0
vehicle-server/src/main/resources/application-dev.yml

@@ -21,6 +21,9 @@ location:
     - key: VPKBZ-CR3CG-R23QE-QK2IY-LNXKZ-GCB34
       channel: TENCENT
 
+chelvc:
+  domain: https://test.chelvc.com/api
+
 wechat:
   payments:
     - name: applet

+ 3 - 0
vehicle-server/src/main/resources/application-pre.yml

@@ -29,3 +29,6 @@ wechat:
       mchid: 1692584316
       mchkey: 5671c0f7c3a2463ab4f602f43f043ba6
       callback: https://test.chelvc.com/api/order/applet/callback
+
+chelvc:
+  domain: https://test.chelvc.com/api

+ 4 - 1
vehicle-server/src/main/resources/application-prod.yml

@@ -21,6 +21,9 @@ location:
     - key: VPKBZ-CR3CG-R23QE-QK2IY-LNXKZ-GCB34
       channel: TENCENT
 
+chelvc:
+  domain: https://www.chelvc.com/api
+
 wechat:
   payments:
     - name: applet
@@ -28,4 +31,4 @@ wechat:
       appid: wx593877b3c990b15c
       mchid: 1692584316
       mchkey: 5671c0f7c3a2463ab4f602f43f043ba6
-      callback: https://test.chelvc.com/api/order/applet/callback
+      callback: https://www.chelvc.com/api/order/applet/callback

+ 3 - 0
vehicle-server/src/main/resources/application-test.yml

@@ -29,3 +29,6 @@ wechat:
       mchid: 1692584316
       mchkey: 5671c0f7c3a2463ab4f602f43f043ba6
       callback: https://test.chelvc.com/api/order/applet/callback
+
+chelvc:
+  domain: https://test.chelvc.com/api

+ 1 - 1
vehicle-server/src/main/resources/application.yml

@@ -16,7 +16,7 @@ spring:
   main:
     allow-bean-definition-overriding: true
   profiles:
-    active: dev
+    active: local
   application:
     name: vehicle
   jackson: