From db3c1f464e80458a1b6ccbe31b0355775df8e574 Mon Sep 17 00:00:00 2001
From: jiangqs <jiangqs>
Date: 星期三, 23 八月 2023 20:45:34 +0800
Subject: [PATCH] bug

---
 ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/util/WechatPayUtils.java |   12 +++++++++++-
 1 files changed, 11 insertions(+), 1 deletions(-)

diff --git a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/util/WechatPayUtils.java b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/util/WechatPayUtils.java
index 95f4c24..0ad0886 100644
--- a/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/util/WechatPayUtils.java
+++ b/ruoyi-modules/ruoyi-shop/src/main/java/com/ruoyi/shop/util/WechatPayUtils.java
@@ -5,6 +5,7 @@
 import com.github.binarywang.wxpay.bean.ecommerce.ApplymentsResult;
 import com.github.binarywang.wxpay.bean.ecommerce.ApplymentsStatusResult;
 import com.github.binarywang.wxpay.bean.media.ImageUploadResult;
+import com.github.binarywang.wxpay.bean.profitsharingV3.ProfitSharingReceiver;
 import com.github.binarywang.wxpay.exception.WxPayException;
 import com.github.binarywang.wxpay.service.EcommerceService;
 import com.github.binarywang.wxpay.service.MerchantMediaService;
@@ -78,7 +79,9 @@
         lpIcBackIO.close();
         id_card_info.setIdCardName(shopAuthentication.getLpCorporateName());
         id_card_info.setIdCardNumber(shopAuthentication.getLpIdCard());
-        id_card_info.setIdCardAddress(shopAuthentication.getLpIdAddress());
+        if(shopAuthentication.getMainType()==2){
+            id_card_info.setIdCardAddress(shopAuthentication.getLpIdAddress());
+        }
         id_card_info.setIdCardValidTimeBegin(shopAuthentication.getLpIcStartDate());
         id_card_info.setIdCardValidTime(shopAuthentication.getLpIcEndDate());
         request.setIdCardInfo(id_card_info);
@@ -154,4 +157,11 @@
         return wxService.getEcommerceService().queryApplyStatusByApplymentId(applymentId);
     }
 
+    public ProfitSharingReceiver addProfitSharingReceiver(ProfitSharingReceiver profitSharingReceiver) throws WxPayException {
+        profitSharingReceiver.setAppid("wxb7f0ea286fc4e535");
+        profitSharingReceiver.setType("MERCHANT_ID");
+        profitSharingReceiver.setRelationType("SERVICE_PROVIDER");
+        ProfitSharingReceiver result = wxService.getProfitSharingV3Service().addProfitSharingReceiver(profitSharingReceiver);
+        return result;
+    }
 }

--
Gitblit v1.7.1