为空修复
This commit is contained in:
parent
ac0c8fe4de
commit
810d4ea1d0
@ -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<LotteryRecord> recordPage = query.orderByDesc(LotteryRecord::getDrawTime).page(page);
|
||||
if (recordPage.getRecords().isEmpty()) {
|
||||
return new PageResult<>();
|
||||
}
|
||||
|
||||
// 查询关联数据
|
||||
List<Long> activityIds = recordPage.getRecords().stream()
|
||||
@ -65,7 +69,7 @@ public class LotteryRecordQryExe {
|
||||
|
||||
List<Long> prizeIds = recordPage.getRecords().stream()
|
||||
.map(LotteryRecord::getPrizeId)
|
||||
.filter(id -> id != null)
|
||||
.filter(Objects::nonNull)
|
||||
.distinct()
|
||||
.collect(Collectors.toList());
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user