This commit is contained in:
2023-10-26 16:54:50 +08:00
parent 10d5636c56
commit 1c252a2d34
6 changed files with 25 additions and 6 deletions

View File

@@ -511,7 +511,11 @@ public class TempService {
List<String> paymentIdList = Lists.newArrayList();
BigDecimal total = BigDecimal.ZERO;
AdapayMemberAccount aDefault = adapayMemberAccountService.getDefault();
String wechatAppId = "wxbb3e0d474569481d";
for (AdaPayment adaPayment : adaPayments) {
String paymentId = adaPayment.getId();
String pay_mode = adaPayment.getPay_mode();
if (StringUtils.isBlank(pay_mode)) {
// 实时分账的不检查
@@ -524,6 +528,10 @@ public class TempService {
continue;
}
if (StringUtils.equals(paymentId, "002212023102509474610563069333816762368")) {
continue;
}
// 交易金额
BigDecimal payAmt = new BigDecimal(adaPayment.getPay_amt());
@@ -536,10 +544,12 @@ public class TempService {
BigDecimal subtract = payAmt.subtract(reservedAmt).subtract(confirmedAmt);
if (subtract.compareTo(BigDecimal.ZERO) > 0) {
paymentIdList.add(adaPayment.getId());
paymentIdList.add(paymentId);
total = total.add(subtract);
logger.info("支付单:{}, 支付金额:{}, 总撤销金额:{}, 总确认金额:{}, 剩余金额:{}",
adaPayment.getId(), payAmt, reservedAmt, confirmedAmt, subtract);
paymentId, payAmt, reservedAmt, confirmedAmt, subtract);
// adapayService.createPaymentConfirmRequest(paymentId, aDefault, subtract, null, wechatAppId);
}
}
logger.info("{} - {} 期间,共有{}笔支付单存在剩余金额, 共计:{}list:{}", dto.getStartTime(), dto.getEndTime(), paymentIdList.size(), total, JSON.toJSONString(paymentIdList));