Merge remote-tracking branch 'origin/dev' into dev

This commit is contained in:
YAS\29473
2025-10-16 16:27:07 +08:00
6 changed files with 113 additions and 212 deletions

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,18 @@ public class AdapayService {
// }
BigDecimal totalWithdraw = clearingWithdrawInfoService.queryTotalWithdraw(merchantId);
vo.setTotalWithdraw(totalWithdraw);
// 在途金额
BigDecimal pendingAmount = BigDecimal.ZERO;
List<WithdrawInfoVO> withdrawInfoVOS = clearingWithdrawInfoService.selectByMerchantId(merchantId);
log.info("==查询提现在途金额param:{}, result:{}", JSON.toJSONString(withdrawInfoVOS), JSON.toJSONString(pendingAmount));
if (CollectionUtils.isNotEmpty(withdrawInfoVOS)) {
pendingAmount = withdrawInfoVOS.stream()
.filter(item -> Constants.ZERO.equals(item.getStatusDesc()))
.map(WithdrawInfoVO::getCashAmt)
.reduce(BigDecimal.ZERO, BigDecimal::add);
}
vo.setPendingAmount(pendingAmount);
return vo;
}
@@ -1793,20 +1806,25 @@ public class AdapayService {
return;
}
// 添加到已分帐list
synchronized (splitList) {
splitList.add(paymentId);
}
for (PaymentConfirmInfo confirm : confirms) {
try {
if (queryConfirmReverseStatus(confirm)) {
log.info("支付确认id:" + confirm.getId() + "撤销了。。。");
// confirms为空add to unSplitList
synchronized (unSplitList) {
unSplitList.add(paymentId);
}
continue;
}
} catch (BaseAdaPayException e) {
throw new RuntimeException(e);
}
// 添加到已分帐list
synchronized (splitList) {
splitList.add(paymentId);
}
JSONObject jsonObject = JSON.parseObject(confirm.getDescription());
String adapayMemberId = jsonObject.getString("adapayMemberId");
if (StringUtils.isBlank(adapayMemberId)) {

View File

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

View File

@@ -17,7 +17,7 @@ public class WithdrawInfoVO {
// 提现编号
private String withdrawCode;
// 提现状态描述
// 提现状态描述 (0-处理中1-已提现)
private String statusDesc;
// 申请时间