This commit is contained in:
2023-09-25 16:08:30 +08:00
parent dac7296ac3
commit c82bf916c2
4 changed files with 32 additions and 4 deletions

View File

@@ -19,4 +19,9 @@ public class QueryPaymentConfirmDTO {
* Adapay生成的支付对象id
*/
private String paymentId;
/**
* Adapay生成的支付确认对象id
*/
private String paymentConfirmId;
}

View File

@@ -1019,6 +1019,27 @@ public class AdapayService {
return queryPaymentConfirmDetailResponse;
}
/**
* 查询支付确认对象详情
*/
public QueryPaymentConfirmDetailResponse.PaymentConfirmInfo queryPaymentConfirmDetail(QueryPaymentConfirmDTO dto) {
AbstractAdapayConfig config = AdapayConfigFactory.getConfig(dto.getWechatAppId());
if (config == null) {
throw new BusinessException(ReturnCodeEnum.CODE_ADAPAY_CONFIG_IS_NULL_ERROR);
}
Map<String, Object> confirmParams = Maps.newHashMap();
confirmParams.put("payment_confirm_id", dto.getPaymentConfirmId());
QueryPaymentConfirmDetailResponse.PaymentConfirmInfo result = null;
try {
Map<String, Object> paymentConfirm = PaymentConfirm.query(confirmParams, config.getWechatAppId());
result = JSON.parseObject(JSON.toJSONString(paymentConfirm), QueryPaymentConfirmDetailResponse.PaymentConfirmInfo.class);
} catch (BaseAdaPayException e) {
throw new RuntimeException(e);
}
return result;
}
/**
* 查询账务流水
*/

View File

@@ -1558,7 +1558,8 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
JSONObject jsonObject = JSON.parseObject(confirm.getDescription());
if (StringUtils.equals(jsonObject.getString("orderCode"), orderCode)) {
// 订单号对的上,累计分账金额
confirmAmt = confirmAmt.add(new BigDecimal(confirm.getConfirmedAmt()));
BigDecimal amount = new BigDecimal(confirm.getConfirmedAmt());
confirmAmt = confirmAmt.add(amount);
feeAmt = feeAmt.add(new BigDecimal(confirm.getFeeAmt()));
}
}