mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-07 07:28:03 +08:00
update
This commit is contained in:
@@ -494,9 +494,10 @@ public class SpringBootTestController {
|
|||||||
public void queryPaymentConfirmListTest() {
|
public void queryPaymentConfirmListTest() {
|
||||||
QueryPaymentConfirmDTO dto = new QueryPaymentConfirmDTO();
|
QueryPaymentConfirmDTO dto = new QueryPaymentConfirmDTO();
|
||||||
dto.setWechatAppId("wxbb3e0d474569481d");
|
dto.setWechatAppId("wxbb3e0d474569481d");
|
||||||
dto.setPaymentId("002212023090917453610546519740849975296");
|
// dto.setPaymentId("0022120230910032226990546664907296944128");
|
||||||
QueryPaymentConfirmDetailResponse queryPaymentConfirmDetailResponse = adapayService.queryPaymentConfirmList(dto);
|
dto.setPaymentConfirmId("0022120230910032226990546664907296944128");
|
||||||
System.out.println(JSON.toJSONString(queryPaymentConfirmDetailResponse));
|
QueryPaymentConfirmDetailResponse.PaymentConfirmInfo paymentConfirmInfo = adapayService.queryPaymentConfirmDetail(dto);
|
||||||
|
System.out.println(JSON.toJSONString(paymentConfirmInfo));
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
|
|||||||
@@ -19,4 +19,9 @@ public class QueryPaymentConfirmDTO {
|
|||||||
* Adapay生成的支付对象id
|
* Adapay生成的支付对象id
|
||||||
*/
|
*/
|
||||||
private String paymentId;
|
private String paymentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Adapay生成的支付确认对象id
|
||||||
|
*/
|
||||||
|
private String paymentConfirmId;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1019,6 +1019,27 @@ public class AdapayService {
|
|||||||
return queryPaymentConfirmDetailResponse;
|
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;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询账务流水
|
* 查询账务流水
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -1558,7 +1558,8 @@ public class OrderBasicInfoServiceImpl implements IOrderBasicInfoService {
|
|||||||
JSONObject jsonObject = JSON.parseObject(confirm.getDescription());
|
JSONObject jsonObject = JSON.parseObject(confirm.getDescription());
|
||||||
if (StringUtils.equals(jsonObject.getString("orderCode"), orderCode)) {
|
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()));
|
feeAmt = feeAmt.add(new BigDecimal(confirm.getFeeAmt()));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user