mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 19:15:35 +08:00
定时任务处理未分帐订单
This commit is contained in:
@@ -10,10 +10,8 @@ import com.jsowell.JsowellApplication;
|
||||
import com.jsowell.adapay.common.DivMember;
|
||||
import com.jsowell.adapay.common.PaymentConfirmInfo;
|
||||
import com.jsowell.adapay.dto.PaymentConfirmParam;
|
||||
import com.jsowell.adapay.dto.QueryConfirmReverseDTO;
|
||||
import com.jsowell.adapay.dto.QueryPaymentConfirmDTO;
|
||||
import com.jsowell.adapay.operation.PaymentReverseOperation;
|
||||
import com.jsowell.adapay.response.ConfirmReverseResponse;
|
||||
import com.jsowell.adapay.response.PaymentConfirmResponse;
|
||||
import com.jsowell.adapay.response.PaymentReverseResponse;
|
||||
import com.jsowell.adapay.response.QueryPaymentConfirmDetailResponse;
|
||||
@@ -349,6 +347,17 @@ public class PaymentTestController {
|
||||
}
|
||||
}
|
||||
|
||||
@Test
|
||||
public void getTotalSplitAmountByPaymentIdTest() {
|
||||
String paymentId = "002212023102523235110563274707384705024";
|
||||
try {
|
||||
BigDecimal amount = adapayService.getTotalSplitAmountByPaymentId(paymentId);
|
||||
System.out.println("分账金额: " + amount);
|
||||
} catch (BaseAdaPayException e) {
|
||||
throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* 查询分账信息
|
||||
@@ -385,7 +394,7 @@ public class PaymentTestController {
|
||||
} else {
|
||||
splitList.add(paymentId);
|
||||
for (PaymentConfirmInfo confirm : confirms) {
|
||||
if (queryConfirmReverseStatus(confirm)) {
|
||||
if (adapayService.queryConfirmReverseStatus(confirm)) {
|
||||
System.out.println("支付确认id:" + confirm.getId() + "撤销了。。。");
|
||||
continue;
|
||||
}
|
||||
@@ -431,26 +440,6 @@ public class PaymentTestController {
|
||||
System.out.println("===================自己:" + JSON.toJSONString(selfList) + ", 数量:" + selfList.size());
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询支付撤销状态
|
||||
* @param confirm
|
||||
* @return
|
||||
* @throws BaseAdaPayException
|
||||
*/
|
||||
private boolean queryConfirmReverseStatus(PaymentConfirmInfo confirm) throws BaseAdaPayException {
|
||||
boolean result = false;
|
||||
QueryConfirmReverseDTO dto = QueryConfirmReverseDTO.builder()
|
||||
.paymentConfirmId(confirm.getId())
|
||||
.wechatAppId(wechatAppId1)
|
||||
.build();
|
||||
ConfirmReverseResponse confirmReverseResponse = adapayService.queryConfirmReverse(dto);
|
||||
if (confirmReverseResponse.isSuccess()) {
|
||||
result = true;
|
||||
}
|
||||
|
||||
return result;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量支付确认撤销
|
||||
* @throws BaseAdaPayException
|
||||
|
||||
Reference in New Issue
Block a user