|
|
@@ -153,6 +153,12 @@ public class StatisticsDataServiceImpl implements StatisticsDataService {
|
|
|
Optional<BigDecimal> totalMoney = orderDons.stream().map(OrderDon::getMoney).reduce(BigDecimal::add);
|
|
|
//总订单金额
|
|
|
backgroundDataView.setTotalOrderAmount(totalMoney.isPresent() ? totalMoney.get().divide(BigDecimal.valueOf(100)) : BigDecimal.ZERO);
|
|
|
+ //退款列表
|
|
|
+ List<OrderDon> refundOrders = Optional.ofNullable(orderDonService.list(Wrappers.lambdaQuery(OrderDon.class).eq(OrderDon::getStatus, OrderDon.Status.refund).select(OrderDon::getId, OrderDon::getRefundMoney))).orElse(new ArrayList<>());
|
|
|
+ backgroundDataView.setTotalNumOfRefundOrder(refundOrders.size());
|
|
|
+ //退款金额
|
|
|
+ Optional<BigDecimal> totalRefundAmount = refundOrders.stream().map(OrderDon::getRefundMoney).reduce(BigDecimal::add);
|
|
|
+ backgroundDataView.setTotalRefundAmount(totalRefundAmount.isPresent() ? totalRefundAmount.get().divide(BigDecimal.valueOf(100)) : BigDecimal.ZERO);
|
|
|
//近5天将要到期的主账号总数
|
|
|
DateTime now = DateTime.now();
|
|
|
DateTime zero = DateUtil.beginOfDay(now);
|