添加在途金额字段

This commit is contained in:
Guoqs
2025-10-15 15:47:36 +08:00
parent 50ffa032f3
commit b7c3e35144
4 changed files with 90 additions and 27 deletions

View File

@@ -329,7 +329,8 @@ public class PaymentTestController {
@Test
public void testCreateConfirmReverse() throws BaseAdaPayException {
List<String> list = getPaymentIdList(); // 批量支付确认撤销
for (String paymentId : list) {
list.parallelStream().forEach(paymentId -> {
// 查询支付确认id
QueryPaymentConfirmDTO dto = new QueryPaymentConfirmDTO();
dto.setPaymentId(paymentId);
@@ -337,14 +338,19 @@ public class PaymentTestController {
QueryPaymentConfirmDetailResponse response = adapayService.queryPaymentConfirmList(dto);
if (response != null) {
List<PaymentConfirmInfo> confirms = response.getPaymentConfirms();
System.out.println("支付id:" + paymentId + ", 确认信息:" + JSON.toJSONString(confirms));
// System.out.println("支付id:" + paymentId + ", 确认信息:" + JSON.toJSONString(confirms));
if (CollectionUtils.isNotEmpty(confirms)) {
for (PaymentConfirmInfo confirm : confirms) {
adapayService.createConfirmReverse(confirm.getId(), wechatAppId1);
try {
adapayService.createConfirmReverse(confirm.getId(), wechatAppId1);
} catch (BaseAdaPayException e) {
throw new RuntimeException(e);
}
}
}
}
}
});
}
/**

View File

@@ -1,23 +1,65 @@
002212025093016404610819019101213786112
002212025093016480010819020923576094720
002212025093016545810819022674920161280
002212025093016591510819023753909075968
002212025093017071710819025774825697280
002212025093017125710819027202424025088
002212025093017191310819028779683803136
002212025093017213010819029354248785920
002212025093021481910819096499045236736
002212025093022004910819099644320247808
002212025093021523910819097588742180864
002212025093021455810819095906331201536
002212025093022312610819107348346822656
002212025093022095910819101953838235648
002212025093022412910819109879650783232
002212025093022355510819108477796941824
002212025093022362310819108594562334720
002212025093023033210819115430052962304
002212025093022294310819106919646871552
002212025093023092610819116914169982976
002212025093023084710819116751426650112
002212025093023125610819117793698590720
002212025093023361610819123667662266368
002212025100100124610819132851484995584
002212025100100401110819139750871646208
002212025100100492810819142085136195584
002212025100101230110819150529255661568
002212025100101202010819149853720911872
002212025100101275810819151777551822848
002212025100101144310819148439712116736
002212025100101330610819153067002662912
002212025100102050010819161097412608000
002212025100102374310819169327337668608
002212025100103153010819178835577352192
002212025100103033410819175836608069632
002212025100104404110819200272652820480
002212025100106202910819225388761600000
002212025100106113010819223130283913216
002212025100107421910819245984283054080
002212025100108231910819256304179310592
002212025100110021110819281181049470976
002212025100110170210819284921118875648
002212025100109410010819275851116531712
002212025100110205510819285896126496768
002212025100109585410819280354930659328
002212025100110172010819284994422427648
002212025100110334110819289111299424256
002212025100111243410819301916094455808
002212025100111301910819303362621829120
002212025100111174910819300215056728064
002212025100111332410819304137389461504
002212025100111395210819305766801072128
002212025100112313210819318766979219456
002212025100112265610819317609439682560
002212025100112260910819317413640880128
002212025100112464110819322579676897280
002212025100112464010819322578251141120
002212025100112544310819324600555925504
002212025100112583010819325555036602368
002212025100113213410819331358657294336
002212025100113013510819326330555183104
002212025100113334510819334426421731328
002212025100113352010819334825002254336
002212025100113394210819335920936144896
002212025100113405810819336242014445569
002212025100114134210819344480776290304
002212025100113521610819339086192672768
002212025100114145510819344786537156608
002212025100114093910819343458142367744
002212025100114254310819347503959453696
002212025100114272110819347915676700672
002212025100114410110819351351906385920
002212025100114433710819352008998633472
002212025100115015810819356627757502464
002212025100114590710819355908099121152
002212025100115125810819359394505121792
002212025100115220510819361690144468992
002212025100115243410819362313090580480
002212025100115294210819363604818784256
002212025100115201610819361230108872704
002212025100115274410819363110792675328
002212025100116490210819383567961284608
002212025100117145910819390102061518848
002212025100117283910819393538530430976
002212025100118150210819405210569781248
002212025100118181410819406018526957568
002212025100118222810819407082739150848
002212025100118264510819408162881343488

View File

@@ -39,6 +39,7 @@ import com.jsowell.pile.domain.MemberBasicInfo;
import com.jsowell.pile.dto.PayOrderDTO;
import com.jsowell.pile.service.*;
import com.jsowell.pile.vo.base.MerchantInfoVO;
import com.jsowell.pile.vo.web.WithdrawInfoVO;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
import org.springframework.beans.factory.annotation.Autowired;
@@ -679,6 +680,17 @@ public class AdapayService {
// }
BigDecimal totalWithdraw = clearingWithdrawInfoService.queryTotalWithdraw(merchantId);
vo.setTotalWithdraw(totalWithdraw);
// 在途金额
BigDecimal pendingAmount = BigDecimal.ZERO;
List<WithdrawInfoVO> withdrawInfoVOS = clearingWithdrawInfoService.selectByMerchantId(merchantId);
if (CollectionUtils.isNotEmpty(withdrawInfoVOS)) {
pendingAmount = withdrawInfoVOS.stream()
.filter(item -> "pending".equals(item.getStatusDesc()))
.map(WithdrawInfoVO::getCashAmt)
.reduce(BigDecimal.ZERO, BigDecimal::add);
}
vo.setPendingAmount(pendingAmount);
return vo;
}

View File

@@ -36,4 +36,7 @@ public class AdapayAccountBalanceVO {
// 累计提现金额
private BigDecimal totalWithdraw;
// 在途金额
private BigDecimal pendingAmount;
}