fix:升级服务调整逻辑,完善通知配置初始化逻辑,回调待优化
This commit is contained in:
@@ -4,10 +4,10 @@ server:
|
||||
spring:
|
||||
application:
|
||||
name: device-center
|
||||
# cloud:
|
||||
# nacos:
|
||||
# discovery:
|
||||
# ip: 119.45.169.13
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
ip: 119.45.169.13
|
||||
# cloud:
|
||||
# nacos:
|
||||
# discovery:
|
||||
|
||||
@@ -90,14 +90,14 @@
|
||||
<artifactId>hibernate-validator</artifactId>
|
||||
</dependency>
|
||||
|
||||
<dependency>
|
||||
<!--<dependency>
|
||||
<groupId>com.github.wechatpay-apiv3</groupId>
|
||||
<artifactId>wechatpay-java</artifactId>
|
||||
<version>0.2.15</version>
|
||||
</dependency>
|
||||
</dependency>-->
|
||||
|
||||
<!-- 微信公众号 SDK -->
|
||||
<dependency>
|
||||
<!--<dependency>
|
||||
<groupId>com.github.binarywang</groupId>
|
||||
<artifactId>weixin-java-mp</artifactId>
|
||||
<version>4.5.0</version>
|
||||
@@ -118,7 +118,7 @@
|
||||
<groupId>com.github.binarywang</groupId>
|
||||
<artifactId>weixin-java-common</artifactId>
|
||||
<version>4.6.0</version>
|
||||
</dependency>
|
||||
</dependency>-->
|
||||
<dependency>
|
||||
<groupId>javax.servlet</groupId>
|
||||
<artifactId>javax.servlet-api</artifactId>
|
||||
|
||||
+8
-8
@@ -1,6 +1,5 @@
|
||||
package com.central.order.controller;
|
||||
|
||||
import com.alibaba.csp.sentinel.util.StringUtil;
|
||||
import com.central.order.constants.ProfitSharingConstants;
|
||||
import com.central.order.enums.OrderStatus;
|
||||
import com.central.order.enums.RefundState;
|
||||
@@ -76,10 +75,11 @@ public class WxPayController {
|
||||
.build();
|
||||
log.info("------收到微信支付成功回调通知------");
|
||||
log.info(requestParam.toString());
|
||||
// @TODO 后面需要将订单号和租户ID缓存进行处理,或者其他方式,目前先使用默认的tenantID,退款也是同样的问题
|
||||
WechatConfig config = wechatConfigService.getConfigBySerialNumber(serial);
|
||||
String tenantId = config.getTenantId();
|
||||
if (StringUtil.isBlank(tenantId)) {
|
||||
tenantId = defaultTenantId;
|
||||
String tenantId = defaultTenantId;
|
||||
if (config != null) {
|
||||
tenantId = config.getTenantId();
|
||||
}
|
||||
|
||||
NotificationParser notificationParser = wxPayConfigFactory.createNotificationParser(tenantId);
|
||||
@@ -201,9 +201,9 @@ public class WxPayController {
|
||||
.build();
|
||||
|
||||
WechatConfig config = wechatConfigService.getConfigBySerialNumber(serial);
|
||||
String tenantId = config.getTenantId();
|
||||
if (StringUtil.isBlank(tenantId)) {
|
||||
tenantId = defaultTenantId;
|
||||
String tenantId = defaultTenantId;
|
||||
if (config != null) {
|
||||
tenantId = config.getTenantId();
|
||||
}
|
||||
|
||||
NotificationParser notificationParser = wxPayConfigFactory.createNotificationParser(tenantId);
|
||||
@@ -240,7 +240,7 @@ public class WxPayController {
|
||||
*/
|
||||
private ProfitSharingNotification parseNotification(RequestParam requestParam) {
|
||||
try {
|
||||
NotificationParser parser = wxPayConfigFactory.createNotificationParser("");
|
||||
NotificationParser parser = wxPayConfigFactory.createNotificationParser(defaultTenantId);
|
||||
// 解析为Map后转换为ProfitSharingNotification对象
|
||||
Map<String, Object> result = parser.parse(requestParam, Map.class);
|
||||
|
||||
|
||||
@@ -4,10 +4,10 @@ server:
|
||||
spring:
|
||||
application:
|
||||
name: order-center
|
||||
# cloud:
|
||||
# nacos:
|
||||
# discovery:
|
||||
# ip: 81.70.164.178
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
ip: 81.70.164.178
|
||||
# cloud:
|
||||
# nacos:
|
||||
# discovery:
|
||||
|
||||
@@ -4,10 +4,10 @@ server:
|
||||
spring:
|
||||
application:
|
||||
name: user-center
|
||||
# cloud:
|
||||
# nacos:
|
||||
# discovery:
|
||||
# ip: 124.222.128.40
|
||||
cloud:
|
||||
nacos:
|
||||
discovery:
|
||||
ip: 124.222.128.40
|
||||
# cloud:
|
||||
# nacos:
|
||||
# discovery:
|
||||
|
||||
Reference in New Issue
Block a user