TRX 1 jaar geleden
bovenliggende
commit
b3ae8b04fe

+ 2 - 1
PaymentClient/src/main/java/com/zhongshu/payment/client/model/WalletModel.java

@@ -1,6 +1,7 @@
 package com.zhongshu.payment.client.model;
 
 import com.zhongshu.payment.client.types.DataState;
+import com.zhongshu.payment.client.types.WalletState;
 import com.zhongshu.payment.client.types.WalletType;
 import io.swagger.v3.oas.annotations.media.Schema;
 import lombok.Data;
@@ -36,7 +37,7 @@ public class WalletModel {
     private BigDecimal totalAmount = BigDecimal.ZERO;
 
     @Schema(description = "钱包状态:是否可用")
-    private DataState dataState = DataState.Enable;
+    private WalletState dataState = WalletState.Enable;
 
     @Schema(description = "钱包类型")
     private WalletType walletType;

+ 2 - 2
PaymentServer/src/main/java/com/zhongshu/payment/server/core/domain/wallet/Wallet.java

@@ -67,7 +67,7 @@ public class Wallet extends SuperEntity {
     @Indexed
     private String openid;
 
-    @Schema(name = "userInfo", description = "用户信息")
+    @Schema(name = "unitInfo", description = "关联的主体信息")
     @Indexed
-    private OrganizationUserModel userInfo;
+    private Object unitInfo;
 }

+ 4 - 0
PaymentServer/src/main/java/com/zhongshu/payment/server/core/service/pay/impl/wallet/WalletMainService.java

@@ -1,6 +1,8 @@
 package com.zhongshu.payment.server.core.service.pay.impl.wallet;
 
 import ch.qos.logback.core.util.StringUtil;
+import cn.hutool.json.JSONUtil;
+import cn.hutool.json.ObjectMapper;
 import com.github.microservice.auth.security.helper.AuthHelper;
 import com.github.microservice.models.type.PaymentType;
 import com.github.microservice.net.ResultContent;
@@ -177,6 +179,7 @@ public class WalletMainService extends SuperPayService {
                 if (ObjectUtils.isNotEmpty(countModel)) {
                     wallet.setUnitName(countModel.getName());
                     wallet.setPhone(countModel.getPhone());
+                    wallet.setUnitInfo(countModel);
                 }
             }
             wallet.setWalletDataId(userId);
@@ -187,6 +190,7 @@ public class WalletMainService extends SuperPayService {
                 if (ObjectUtils.isNotEmpty(simpleModel)) {
                     wallet.setUnitName(simpleModel.getName());
                     wallet.setPhone(simpleModel.getContactPhone());
+                    wallet.setUnitInfo(simpleModel);
                 }
             }
             organizationFeignService.getOidAboutOrgInfo(shopId);