From e15d32ed8e0644f16edc00241286dd2984bf5609 Mon Sep 17 00:00:00 2001 From: hurui <177768073@qq.com> Date: Tue, 7 Jun 2022 15:35:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E4=BB=A3=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../HighMerchantTripartitePlatformController.java | 8 ++++---- .../java/com/cweb/controller/pay/OrderController.java | 7 +++---- 2 files changed, 7 insertions(+), 8 deletions(-) diff --git a/hai-bweb/src/main/java/com/bweb/controller/HighMerchantTripartitePlatformController.java b/hai-bweb/src/main/java/com/bweb/controller/HighMerchantTripartitePlatformController.java index 80425071..5cf2012f 100644 --- a/hai-bweb/src/main/java/com/bweb/controller/HighMerchantTripartitePlatformController.java +++ b/hai-bweb/src/main/java/com/bweb/controller/HighMerchantTripartitePlatformController.java @@ -55,8 +55,8 @@ public class HighMerchantTripartitePlatformController { if (body.getBoolean("profitSharingStatus") == true && (body.getBigDecimal("profitSharingRatio") == null || - StringUtils.isBlank(body.getString("profitSharingReceiversNumber"))) || - StringUtils.isBlank(body.getString("profitSharingReceiversName"))) { + StringUtils.isBlank(body.getString("profitSharingReceiversNumber")) || + StringUtils.isBlank(body.getString("profitSharingReceiversName")))) { log.error("HighMerchantController -> insertMerchantStore() error!",""); throw ErrorHelp.genException(SysCode.System, ErrorCode.REQ_PARAMS_ERROR, ""); } @@ -74,8 +74,8 @@ public class HighMerchantTripartitePlatformController { platform.setProfitSharingReceiversNumber(body.getString("profitSharingReceiversNumber")); platform.setProfitSharingReceiversName(body.getString("profitSharingReceiversName")); - // 微信平台 - if (platform.getPlatformType().equals(1)) { + // 微信平台 增加分账关系 + if (platform.getPlatformType().equals(1) && platform.getProfitSharingStatus().equals(true)) { WxSharingReceiversVO receiversVO = new WxSharingReceiversVO(); receiversVO.setAccount(platform.getProfitSharingReceiversNumber()); receiversVO.setType("MERCHANT_ID"); diff --git a/hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java b/hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java index 20ccd05a..09d907d9 100644 --- a/hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java +++ b/hai-cweb/src/main/java/com/cweb/controller/pay/OrderController.java @@ -225,12 +225,11 @@ public class OrderController { profitSharing = "N"; // 第三方平台 - HighMerchantTripartitePlatform merTripartitePlatform = tripartitePlatformService.getDetail(store.getId(), 1); + HighMerchantTripartitePlatform merTripartitePlatform = tripartitePlatformService.getDetail(store.getMerchantId(), 1); if (merTripartitePlatform != null) { weChatPayReqInfo.setSub_mch_id(merTripartitePlatform.getPlatformMerNumber()); - if (merTripartitePlatform.getProfitSharingRatio().compareTo(new BigDecimal("0")) == 1) { - profitSharing = merTripartitePlatform.getProfitSharingStatus().equals(true)?"Y":"N"; - } + // 是否分账 + profitSharing = merTripartitePlatform.getProfitSharingStatus().equals(true)?"Y":"N"; } } if (store.getPrestoreType().equals(1)) {