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());