mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-20 11:05:18 +08:00
添加在途金额字段
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
@@ -36,4 +36,7 @@ public class AdapayAccountBalanceVO {
|
||||
|
||||
// 累计提现金额
|
||||
private BigDecimal totalWithdraw;
|
||||
|
||||
// 在途金额
|
||||
private BigDecimal pendingAmount;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user