From e2f1afc0fda59738106bc1247c5d87f7b2f3a61b Mon Sep 17 00:00:00 2001 From: "autumn.g@foxmail.com" Date: Fri, 25 Aug 2023 11:53:53 +0800 Subject: [PATCH] =?UTF-8?q?updateupdate=20=E6=89=93=E5=8D=B0=E6=97=A5?= =?UTF-8?q?=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../jsowell/adapay/service/AdapayService.java | 49 ++++--------------- 1 file changed, 10 insertions(+), 39 deletions(-) diff --git a/jsowell-pile/src/main/java/com/jsowell/adapay/service/AdapayService.java b/jsowell-pile/src/main/java/com/jsowell/adapay/service/AdapayService.java index 41d09e573..ddcc1a0cc 100644 --- a/jsowell-pile/src/main/java/com/jsowell/adapay/service/AdapayService.java +++ b/jsowell-pile/src/main/java/com/jsowell/adapay/service/AdapayService.java @@ -160,6 +160,15 @@ public class AdapayService { String wechatAppId = pileMerchantInfoService.queryAppIdByMerchantId(dto.getMerchantId()); dto.setWechatAppId(wechatAppId); + String cardId = dto.getCardId(); + String cardNo = dto.getCardNo(); + if (StringUtils.isBlank(cardId) && StringUtils.isNotBlank(cardNo)) { + dto.setCardId(cardNo); + } + if (StringUtils.isBlank(cardNo) && StringUtils.isNotBlank(cardId)) { + dto.setCardNo(cardId); + } + if (StringUtils.equals(bankAcctType, Constants.ONE)) { createCorpMember(dto); } else if (StringUtils.equals(bankAcctType, Constants.TWO)) { @@ -205,45 +214,6 @@ public class AdapayService { throw new BusinessException("00500001", errorMsg); } - /*// 创建结算账户 - Map accountInfo = Maps.newHashMap(); - // 银行卡号 - accountInfo.put("card_id", dto.getCardId()); - // 银行卡对应的户名 - accountInfo.put("card_name", dto.getCardName()); - // 证件号,银行账户类型为对私时,必填 - if (StringUtils.isNotBlank(dto.getCertId())) { - accountInfo.put("cert_id", dto.getCertId()); - } - // 证件类型,仅支持:00-身份证,银行账户类型为对私时,必填 - accountInfo.put("cert_type", "00"); - // 手机号 - accountInfo.put("tel_no", dto.getTelNo()); - // 银行编码,详见附录 银行代码,银行账户类型对公时,必填 - if (StringUtils.isNotBlank(dto.getBankCode())) { - accountInfo.put("bank_code", dto.getBankCode()); - } - // 银行账户类型:1-对公;2-对私 - accountInfo.put("bank_acct_type", dto.getBankAcctType()); - // 银行账户开户银行所在省份编码 (省市编码),银行账户类型为对公时,必填 - if (StringUtils.isNotBlank(dto.getProvCode())) { - accountInfo.put("prov_code", dto.getProvCode()); - } - // 银行账户开户银行所在地区编码(省市编码),银行账户类型为对公时,必填 - if (StringUtils.isNotBlank(dto.getAreaCode())) { - accountInfo.put("area_code", dto.getAreaCode()); - } - - Map settleCountParams = Maps.newHashMap(); - settleCountParams.put("member_id", adapayMemberId); - settleCountParams.put("app_id", config.getAdapayAppId()); - // channel String Y 目前仅支持:bank_account(银行卡) - settleCountParams.put("channel", "bank_account"); - settleCountParams.put("account_info", accountInfo); - log.info("创建汇付结算账户param:{}", settleCountParams); - Map settleCount = SettleAccount.create(settleCountParams, config.getWechatAppId()); - log.info("创建汇付结算账户result:{}", settleCount);*/ - Map settleCount = createSettleAccountRequest(dto, adapayMemberId, dto.getWechatAppId()); if (settleCount == null || StringUtils.equals((String) settleCount.get("status"), "failed")) { @@ -418,6 +388,7 @@ public class AdapayService { Map accountInfo = Maps.newHashMap(); // 银行卡号 accountInfo.put("card_id", dto.getCardId()); + accountInfo.put("card_no", dto.getCardNo()); // 银行卡对应的户名 accountInfo.put("card_name", dto.getCardName()); // 证件号,银行账户类型为对私时,必填