...
|
...
|
@@ -96,12 +96,19 @@ public class InviteSettlementServiceImpl implements IInviteSettlementService { |
|
|
List<Integer> statusList = getStatusList(tab);
|
|
|
// 只查询结算规则1的记录
|
|
|
int settlementType = 1;
|
|
|
|
|
|
InviteSettlementItemStats stats = inviteSettlementItemMapper.selectStats(uid, statusList, settlementType, time.getLeft(), time.getRight());
|
|
|
int totalElements = Objects.isNull(stats.getTotalElements()) ? 0 : stats.getTotalElements();
|
|
|
BigDecimal totalOrderAmount = Objects.isNull(stats.getTotalOrderAmount()) ? BigDecimal.ZERO : stats.getTotalOrderAmount();
|
|
|
BigDecimal totalSettleAmount = Objects.isNull(stats.getTotalSettleAmount()) ? BigDecimal.ZERO : stats.getTotalSettleAmount();
|
|
|
BigDecimal totalPaidAmount = Objects.isNull(stats.getTotalPaidAmount()) ? BigDecimal.ZERO : stats.getTotalPaidAmount();
|
|
|
BigDecimal totalWaitPayAmount = Objects.isNull(stats.getTotalWaitPayAmount()) ? BigDecimal.ZERO : stats.getTotalWaitPayAmount();
|
|
|
InviteSettlementItemStats statsAll;
|
|
|
if (tab != 0) {
|
|
|
statsAll = inviteSettlementItemMapper.selectStats(uid, getStatusList(0), settlementType, time.getLeft(), time.getRight());
|
|
|
} else {
|
|
|
statsAll = stats;
|
|
|
}
|
|
|
BigDecimal totalSettleAmount = Objects.isNull(statsAll.getTotalSettleAmount()) ? BigDecimal.ZERO : statsAll.getTotalSettleAmount();
|
|
|
BigDecimal totalPaidAmount = Objects.isNull(statsAll.getTotalPaidAmount()) ? BigDecimal.ZERO : statsAll.getTotalPaidAmount();
|
|
|
BigDecimal totalWaitPayAmount = Objects.isNull(statsAll.getTotalWaitPayAmount()) ? BigDecimal.ZERO : statsAll.getTotalWaitPayAmount();
|
|
|
InviteSettlementItemListVO.InviteSettlementItemListVOBuilder builder = InviteSettlementItemListVO.builder();
|
|
|
builder.page(page)
|
|
|
.pageSize(limit)
|
...
|
...
|
@@ -145,13 +152,13 @@ public class InviteSettlementServiceImpl implements IInviteSettlementService { |
|
|
|
|
|
private List<Integer> getStatusList(Integer tab) {
|
|
|
if (tab == 0) {
|
|
|
return Lists.newArrayList(1, 3, 4);
|
|
|
return Lists.newArrayList(InviteSettlementItem.STATUS_ENABLE, InviteSettlementItem.STATUS_SETTLED, InviteSettlementItem.STATUS_PAID);
|
|
|
}
|
|
|
if (tab == 1) {
|
|
|
return Lists.newArrayList(1, 3);
|
|
|
return Lists.newArrayList(InviteSettlementItem.STATUS_ENABLE, InviteSettlementItem.STATUS_SETTLED);
|
|
|
}
|
|
|
if (tab == 2) {
|
|
|
return Lists.newArrayList(4);
|
|
|
return Lists.newArrayList(InviteSettlementItem.STATUS_PAID);
|
|
|
}
|
|
|
throwServiceException("参数不正确");
|
|
|
return Lists.newArrayList();
|
...
|
...
|
|