updateupdate 打印日志

This commit is contained in:
2023-08-25 11:53:53 +08:00
parent 3b1d972a71
commit e2f1afc0fd

View File

@@ -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<String, Object> 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<String, Object> 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<String, Object> settleCount = SettleAccount.create(settleCountParams, config.getWechatAppId());
log.info("创建汇付结算账户result:{}", settleCount);*/
Map<String, Object> settleCount = createSettleAccountRequest(dto, adapayMemberId, dto.getWechatAppId());
if (settleCount == null || StringUtils.equals((String) settleCount.get("status"), "failed")) {
@@ -418,6 +388,7 @@ public class AdapayService {
Map<String, Object> accountInfo = Maps.newHashMap();
// 银行卡号
accountInfo.put("card_id", dto.getCardId());
accountInfo.put("card_no", dto.getCardNo());
// 银行卡对应的户名
accountInfo.put("card_name", dto.getCardName());
// 证件号,银行账户类型为对私时,必填