收款、余额、账单、收银点

This commit is contained in:
lyf
2023-02-14 09:14:13 +08:00
parent ff900668b2
commit ca958158db
7 changed files with 64 additions and 48 deletions

View File

@@ -282,7 +282,6 @@ public class AliyunServiceImpl implements AliyunService {
throw new MsgException("银行卡认证失败");
}
JSONObject jsonObject = JSON.parseObject(String.valueOf(verifyBankElementResponse.getBody()));
if (!"200".equals(verifyBankElementResponse.getBody().getCode())) {
if ("403".equals(verifyBankElementResponse.getBody().getCode())) {
throw new MsgException("银行卡认证接口已欠费,请联系平台");
@@ -290,22 +289,5 @@ public class AliyunServiceImpl implements AliyunService {
throw new MsgException("银行卡认证失败");
}
}
Bank4Cache bank4Cache = new Bank4Cache();
if (!"0".equalsIgnoreCase(jsonObject.getString("error_code"))) {
bank4Cache.setPhone(phone);
bank4Cache.setBankCardNo(bankCardNo);
bank4Cache.setIdCardNo(certNo);
bank4Cache.setName(realName);
Calendar instance = Calendar.getInstance();
instance.add(Calendar.DAY_OF_MONTH, -1);
bank4Cache.setCreateTimeStart(instance.getTime());
log.error("银行卡四要素检查:" + jsonObject.getString("reason"));
bank4Cache.setRemark(jsonObject.getString("reason"));
bank4Cache.setStatus(Bank4Cache.STATUS_FAIL);
throw new MsgException("身份证、银行卡或预留手机号信息不正确");
} else {
bank4Cache.setStatus(Bank4Cache.STATUS_PASS);
bank4CacheService.save(bank4Cache);
}
}
}

View File

@@ -352,11 +352,10 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
if (accIdCard == null) {
accIdCard = legalIdCard;
idCardService.save(accIdCard);
} else {
accIdCard.setId(legalIdCard.getId());
idCardService.updateById(accIdCard);
}
// else {
// accIdCard.setId(legalIdCard.getId());
// idCardService.updateById(accIdCard);
// }
account.setIdCardId(accIdCard.getId() + "");
accountDTO.setIdcard(accIdCard);
accountDTO.getBankCard().setBankHolder(accIdCard.getCertName());
@@ -379,13 +378,13 @@ public class AccountServiceImpl extends ServiceImpl<AccountMapper, Account> impl
}
boolean settleTypeFlag = Account.SETTLE_TYPE_CORPORATE.equals(accountDTO.getSettleType());
if (checkFlag && !(settleTypeFlag)) {
// 执行银行卡四要素校验
aliyunService.checkBankCorrectNow(accountDTO.getBankCard().getPhone(), accountDTO.getBankCard().getBankCardNo()
, accountDTO.getIdcard().getCertNo()
, accountDTO.getBankCard().getBankHolder(), "结算人与结算银行卡不匹配,请核对结算信息");
}
//TODO 测试时先注掉
// if (checkFlag && !(settleTypeFlag)) {
// // 执行银行卡四要素校验
// aliyunService.checkBankCorrectNow(accountDTO.getBankCard().getPhone(), accountDTO.getBankCard().getBankCardNo()
// , accountDTO.getIdcard().getCertNo()
// , accountDTO.getBankCard().getBankHolder(), "结算人与结算银行卡不匹配,请核对结算信息");
// }
bankCardService.save(accountDTO.getBankCard());
account.setBankCardId(accountDTO.getBankCard().getId() + "");

View File

@@ -162,14 +162,15 @@ public class ApiPayServiceImpl implements ApiPayService {
MerchantBaseInfo baseInfo = merchantBaseInfoMapper.selectOne(queryWrapper);
Optional.ofNullable(baseInfo).orElseThrow(() -> new MsgException("当前商户暂未完成商户认证功能!"));
// 全局电子围栏和单商户电子围栏判定
if (!commonSwitchService.allowEcdemicPay() && !store.allowEcdemicPay()) {
// 不允许异地支付的时候需要校验ip和商户所在城市
try {
merchantService.checkPayLocation(jsonObject.getString("ip"), baseInfo, jsonObject.getString("province"));
} catch (PayRiskException e) {
throw new MsgException(e.getMessage());
}
}
//TODO 先关闭异地支付
// if (!commonSwitchService.allowEcdemicPay() && !store.allowEcdemicPay()) {
// // 不允许异地支付的时候需要校验ip和商户所在城市
// try {
// merchantService.checkPayLocation(jsonObject.getString("ip"), baseInfo, jsonObject.getString("province"));
// } catch (PayRiskException e) {
// throw new MsgException(e.getMessage());
// }
// }
MerchantChannelStatus channel = null;
if("trans_wap_pay".equals(jsonObject.getString("method"))){
channel = merchantChannelStatusService.getByMerchantCode(baseInfo.getMerchantCode(),4);