zoujiajian 1 år sedan
förälder
incheckning
357b8b4036

+ 10 - 0
netflix-service/src/main/java/com/cyksj/common/EnvCommonService.java

@@ -32,6 +32,9 @@ public class EnvCommonService {
 	@Value(value = "${wechat.domain}")
 	private String domain;
 
+	@Value(value = "${wechat.notifyDomain}")
+	private String notifyDomain;
+
 	public String getHost() {
 		if (isPreEnv()) {
 			return domain.replaceAll("8081", "8082");
@@ -39,6 +42,13 @@ public class EnvCommonService {
 		return domain;
 	}
 
+	public String getNotifyHost() {
+		if (isPreEnv()) {
+			return notifyDomain.replaceAll("8081", "8082");
+		}
+		return notifyDomain;
+	}
+
 	public String getDomain() {
 		return this.getHost().substring(0, this.getHost().indexOf("80"));
 	}

+ 2 - 2
netflix-service/src/main/java/com/cyksj/service/pay/impl/AliPayCommonServiceImpl.java

@@ -325,7 +325,7 @@ public class AliPayCommonServiceImpl implements AliPayCommonService {
 		GoodsDon goodsDon = goodsDonMapper.selectById(orderDon.getGoodsId());
 		String subject = goodsDon.getTitle();
 		//回调地址
-		String host = envCommonService.getHost();
+		String host = envCommonService.getNotifyHost();
 		String notifyUrl = String.format("%s%s", host, BaseZfbConfig.wholesaleNotifyUrl);
 		//是否在微信内支付 微信内支付宝支付后 支付宝回调页面不跳转
 		Boolean isWx = Optional.ofNullable(re.getIsWx()).orElse(false);
@@ -365,7 +365,7 @@ public class AliPayCommonServiceImpl implements AliPayCommonService {
 		depositMapper.updateById(orderDon);
 		String subject = "押金";
 		//回调地址
-		String host = envCommonService.getHost();
+		String host = envCommonService.getNotifyHost();
 		String notifyUrl = String.format("%s%s", host, BaseZfbConfig.wholesaleDepositNotifyUrl);
 		//是否在微信内支付 微信内支付宝支付后 支付宝回调页面不跳转
 		Boolean isWx = Optional.ofNullable(re.getIsWx()).orElse(false);