From 810d4ea1d00a1067b9435e5c1afd6530225138a8 Mon Sep 17 00:00:00 2001 From: tianfeng <769204422@qq.com> Date: Fri, 24 Oct 2025 15:12:34 +0800 Subject: [PATCH] =?UTF-8?q?=E4=B8=BA=E7=A9=BA=E4=BF=AE=E5=A4=8D?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../other/app/command/activity/LotteryRecordQryExe.java | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/LotteryRecordQryExe.java b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/LotteryRecordQryExe.java index 7bc17d57..6480a605 100644 --- a/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/LotteryRecordQryExe.java +++ b/rc-service/rc-service-other/other-application/src/main/java/com/red/circle/other/app/command/activity/LotteryRecordQryExe.java @@ -14,6 +14,7 @@ import com.red.circle.other.infra.database.rds.service.activity.LotteryPrizeServ import com.red.circle.other.infra.database.rds.service.activity.LotteryRecordService; import java.util.List; import java.util.Map; +import java.util.Objects; import java.util.stream.Collectors; import lombok.RequiredArgsConstructor; import org.springframework.stereotype.Component; @@ -56,6 +57,9 @@ public class LotteryRecordQryExe { } IPage recordPage = query.orderByDesc(LotteryRecord::getDrawTime).page(page); + if (recordPage.getRecords().isEmpty()) { + return new PageResult<>(); + } // 查询关联数据 List activityIds = recordPage.getRecords().stream() @@ -65,7 +69,7 @@ public class LotteryRecordQryExe { List prizeIds = recordPage.getRecords().stream() .map(LotteryRecord::getPrizeId) - .filter(id -> id != null) + .filter(Objects::nonNull) .distinct() .collect(Collectors.toList());