From 976a372f42b438edd8465a66e084b36deef38500 Mon Sep 17 00:00:00 2001
From: luodangjia <luodangjia>
Date: 星期一, 13 一月 2025 17:11:54 +0800
Subject: [PATCH] 12.18

---
 ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/BalanceChangeRecordServiceImpl.java |   11 ++++++-----
 1 files changed, 6 insertions(+), 5 deletions(-)

diff --git a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/BalanceChangeRecordServiceImpl.java b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/BalanceChangeRecordServiceImpl.java
index b768edd..1d369a8 100644
--- a/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/BalanceChangeRecordServiceImpl.java
+++ b/ruoyi-service/ruoyi-account/src/main/java/com/ruoyi/account/service/impl/BalanceChangeRecordServiceImpl.java
@@ -82,10 +82,13 @@
         int fromIndex = (int) ((current - 1) * size);
         int toIndex = (int) Math.min(fromIndex + size, walletStatisticsDetailList.size());
 
-        if (fromIndex >= walletStatisticsDetailList.size()) {
-            return new WalletStatistics();
-        }
 
+        Page<WalletStatisticsDetail> walletStatisticsDetailPage = new Page<>();
+        WalletStatistics walletStatistics = new WalletStatistics();
+        if (fromIndex >= walletStatisticsDetailList.size()) {
+            walletStatistics.setPage(walletStatisticsDetailPage);
+            return walletStatistics;
+        }
 
         Map<Integer, BigDecimal> shopCommissionMap = walletStatisticsDetailList.stream()
                 .collect(Collectors.groupingBy(
@@ -103,8 +106,6 @@
 
         List<WalletStatisticsDetail> walletStatisticsDetailList2 = walletStatisticsDetailList.subList(fromIndex, toIndex);
 
-        WalletStatistics walletStatistics = new WalletStatistics();
-        Page<WalletStatisticsDetail> walletStatisticsDetailPage = new Page<>();
         walletStatisticsDetailPage.setCurrent(current);
         walletStatisticsDetailPage.setSize(size);
         walletStatisticsDetailPage.setTotal(walletStatisticsDetailList.size());

--
Gitblit v1.7.1