|
|
@@ -103,7 +103,12 @@ public class AgentServiceImpl implements IAgentService {
|
|
|
vo.setTotalStatisticsAmount(agentBalanceRecordService.sumStatistics(vo.getAgentId(), BillType.INNER, BalanceSourceType.USER_ORDER, null));
|
|
|
vo.setTotalStatisticsWithdrawalAmount(agentBalanceRecordService.sumStatistics(vo.getAgentId(), BillType.OUTER, BalanceSourceType.WITHDRAW, null));
|
|
|
//减去提现失败
|
|
|
- vo.setTotalStatisticsWithdrawalAmount(vo.getTotalStatisticsWithdrawalAmount().subtract(agentBalanceRecordService.sumStatistics(vo.getAgentId(), BillType.INNER, BalanceSourceType.WITHDRAW_FAIL, null)));
|
|
|
+ if (ObjectUtil.isNotNull(vo.getTotalStatisticsWithdrawalAmount())) {
|
|
|
+ BigDecimal failAmount = agentBalanceRecordService.sumStatistics(vo.getAgentId(), BillType.INNER, BalanceSourceType.WITHDRAW_FAIL, null);
|
|
|
+ if (ObjectUtil.isNotNull(failAmount)) {
|
|
|
+ vo.setTotalStatisticsWithdrawalAmount(vo.getTotalStatisticsWithdrawalAmount().subtract(failAmount));
|
|
|
+ }
|
|
|
+ }
|
|
|
vo.setSurplusAccountCode(agentAccountCodeService.sumSurplusAccountCode(vo.getAgentId(), Arrays.asList(AccountCodeStatus.UNUSED, AccountCodeStatus.WAIT_USE)));
|
|
|
vo.setPromotionBusinessNum(businessService.sumPromotionBusinessNum(vo.getAgentId()));
|
|
|
return vo;
|
|
|
@@ -359,7 +364,12 @@ public class AgentServiceImpl implements IAgentService {
|
|
|
//减去提现失败
|
|
|
bo.setBillType(BillType.INNER);
|
|
|
bo.setSourceType(BalanceSourceType.WITHDRAW_FAIL);
|
|
|
- agentAmountStatisticsVo.setTotalStatisticsWithdrawalAmount(agentAmountStatisticsVo.getTotalStatisticsWithdrawalAmount().subtract(baseMapper.selectSumAmount(bo)));
|
|
|
+ if (ObjectUtil.isNotNull(agentAmountStatisticsVo.getTotalStatisticsWithdrawalAmount())) {
|
|
|
+ BigDecimal failAmount = baseMapper.selectSumAmount(bo);
|
|
|
+ if (ObjectUtil.isNotNull(failAmount)) {
|
|
|
+ agentAmountStatisticsVo.setTotalStatisticsWithdrawalAmount(agentAmountStatisticsVo.getTotalStatisticsWithdrawalAmount().subtract(failAmount));
|
|
|
+ }
|
|
|
+ }
|
|
|
return agentAmountStatisticsVo;
|
|
|
}
|
|
|
|